Chapter 13: Multifile Programs

Example 13.1, Page Number 657

In [1]:
fact = 1

numb = input("Enter number: ")            #Enter a long number

for j in range (numb,0,-1):               #factorial is numb * numb-1 * numb-2 * numb-3 and so on
    fact *= j
    
print "Factorial is:",fact                #display factorial
Enter number: 100
Factorial is: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
In [ ]: