score = 0 count = 0 input("Press Enter To Start, press x to stop: ") while True: player = input("Enter a number or 'x' to stop: ") if player == "x": break else: player = int(player) score += player count += 1 if count > 0: print("Your Total is", score) average = score / count print("Average:", average) else: print("No numbers were entered.") #works