factorial using python genrators

technical talkiess
0

 


Factorial program:= 

def fact(n):

    if n ==0:

        return 1

    return n * fact(n-1)


print(fact(4))

# print(iter(fact(4)).__next__())


Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)