Aug-03-2019, 01:42 PM
Good morning
I have been working on this for a couple of hours this morning, going over the append command as stated in the tutorial listed above.
I have come a long way (i think) in cleaning this up. I was able to use the append to get a score added to my list, but now it seems after I add the score it wants another score and another score when it should go back to the menu. all other inputs go back to menu so not sure why this one is not
I have been working on this for a couple of hours this morning, going over the append command as stated in the tutorial listed above.
I have come a long way (i think) in cleaning this up. I was able to use the append to get a score added to my list, but now it seems after I add the score it wants another score and another score when it should go back to the menu. all other inputs go back to menu so not sure why this one is not
menu = """ 1: Enter to exit 2: List scores so far 3: Add a score 4: Display the highest and lowest scores """ score = [ 85.3, 85.2, 21.99 ] done = False finished = False while not done: print (menu) 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:") print(*score, sep = "\n") elif selection == "3": while len(score): scores = input("Please enter a score between 0 and 100: ") score.append(scores) print(*score, sep = "\n") print ('score added to list') elif selection == "4": print("Score engine highest to lowest:") score.sort() print("Highest score:", max(score), "Lowest score:", min(score))