make a program that will accept an integer and then print out its factorial using loops
n = int(input('n = ')) f = 1 if n > 0: for i in range(n): f *= i+1 print(f'{n}! = {f}')
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment