Write a Python Program to ask the team captain to enter the scores of the top 4 team members. Using the max function, output the top score. Insert into your HW document a screen shot of your program file and of the output in IDLE when you run the program.
I have written the program using PYTHON PROGRAMMING LANGUAGE.
OUTPUT :
CODE :
#print statement
print ("\nHi!!! Team Captain , Please Enter the scores of top 4 Team Members !!! \n")
scorelist = []#defined empty list to add the scores
#used for loop to take the user input for the top 4 scores
for i in range(4):
#taking user input
score = int(input("Enter Score"+str(i+1)+" : "))
#adding score to the list
scorelist.append(score)
#to print the output on the console
print("\nOUTPUT : \nTop Score is {:d}".format(max(scorelist)))
Thanks..
Get Answers For Free
Most questions answered within 1 hours.