Answer to Question #279172 in Python for kyyy

Question #279172

 make a program that will accept an integer and then print out its factorial using loops


1
Expert's answer
2021-12-13T10:21:21-0500
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?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS