Since it appears the due date is done for this one, here is what I was trying to show you:
MENU = """
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: """
scores = [85.3, 85.2, 21.99]
while True:
choice = input(MENU).strip()
if choice == '1':
print('\nThank you for using the score engine.')
break
elif choice == '2':
scores.sort()
print('\nScores entered so far:', ', '.join(['{:.2f}'.format(score) for score in scores]))
elif choice == '3':
new_score = float(input('\nPlease enter a score between 0 and 100: '))
if new_score < 0:
print('That score is too low.')
elif new_score > 100:
print('That score is too high.')
else:
scores.append(new_score)
elif choice == '4':
scores.sort()
print('\nThe scores range from {:.2f} to {:.2f}.'.format(scores[0], scores[len(scores) - 1]))
else:
print('\nThat selection is invalid. Please enter a number from 1 to 4.')
Output:
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: 3
Please enter a score between 0 and 100: 80.108
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: 3
Please enter a score between 0 and 100: 801
That score is too high.
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: 3
Please enter a score between 0 and 100: -1
That score is too low.
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: 2
Scores entered so far: 21.99, 80.11, 85.20, 85.30
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: 4
The scores range from 21.99 to 85.30.
1: Exit
2: Display scores
3: Add a score
4: Display lowest and highest scores
Enter your choice: 1
Thank you for using the score engine.