# file: factorial.py # # This program calculates the factorial of an inputed positive integer # n!=1*2*3*...*(n-2)(n-1)n # def main(): print("This program computes the factorial of the inputed number") n = int(input("Please, input a positive integer number:")) factorial=1 for factor in range(1,n+1): factorial = factorial*factor #print("factor=", factor, ";",factor, "! =",factorial) print(n,"! =", factorial) main()