Sunday, March 6, 2022

Factorial in Python

 n=int(input("Please enter a n number"))
f=1
while n>=1:
      f=f*n
      n=n-1
print("Factorial:",f)

 




No comments:

Post a Comment

MCQ QUESTIONS

Loading…