numbers = [] user_input = "" while user_input != "x": user_input = input("Enter a number: ") if user_input != "x": numbers.append(float(user_input)) total = sum(numbers) average = total / len(numbers) print("Total: ", total) print("Average: ", round(average, 1))