Sep-01-2020, 03:09 PM
I believe all is asked for is wrapping a loop around the loop. To elaborate slightly on Gribouillis:
while True: try: n = int(input('Enter number or done: ')) except ValueError: break # Quit if input is not a number factorial = 1 for i in range(1, n+1): factorial *= i print(f'{n}! = {factorial}')