Horje
factorial python for loop Code Example
factorial python for loop
#Factorial 
'''factorial n! - n* n-1*n-2..1'''

def fac_iterative_method(n):
    fac = 1
    for i in range(n):
        fac = (fac * (i+1))
        print('fac of',i+1,'=',fac)
        
number = int(input('enter the number'))
fac_iterative_method(number)




Python

Related
how to print all combinations of a string in python Code Example how to print all combinations of a string in python Code Example
python - exclude rowin data frame based on value Code Example python - exclude rowin data frame based on value Code Example
if none in column remove row Code Example if none in column remove row Code Example
how to read from a file into a list in python Code Example how to read from a file into a list in python Code Example
python create file if not exists Code Example python create file if not exists Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7