Aug-05-2019, 01:18 AM
Well, I have a couple of hours left before the assignment is due and I am beating my head on the wall.
This is what I have so far and #notes what I need to figure out
I went back over and over again to try to understand what you wrote but I cant get it.
This is what I have so far and #notes what I need to figure out
I went back over and over again to try to understand what you wrote but I cant get it.
menu = """ 1: Enter to exit 2: List scores so far 3: Add a score 4: Display the highest and lowest scores """ scores = [ 85.3, 85.2, 21.99 ] done = False while not done: print (menu) try: selection = input ("Please enter menu item 1-4: ") if selection == "1": done = True print("Thank you for using The score engine") elif selection == "2": print("Scores recorded so far:") scores.sort() print(*scores, sep = "\n") #selection 3 I need to ensure a number les than 1 and more than 100 can not be entered (message stating invalid entry) elif selection == "3": score = input ("Please enter a score between 0 and 100: ") scores.append(float(score)) scores.sort() print ('score added to list') #selection 4 I need to list the highest and lowest number in the list elif selection == "4": print("Score engine highest to lowest:") print("lowest score is: ", scores[len(scores)-1]) print("highest score is: ", scores(scores)[0]) else: print("{} is not a valid entry".format(selection)) print() except ValueError: print("Please enter a valid input! ")