Factorial in Python - iteratively <<algorithm n = int(input('n = ')) i = 1 s = 1 while i <= n: s *= i i += 1 print(n , '! =', s)