# # Computes n factorial # n = input("Enter n: ") result = 1 i = n while i > 0: result = result * i i = i - 1 print n, "factorial is", result