Oct-25-2019, 12:40 AM
scores = [] while True: try: score = int(input('Enter a score or -1 to quit: ')) except ValueError: print(f"Please enter a number") continue if score == -1: break scores.append(score) print(f"Mean of scores is {sum(scores)/len(scores)}")