Question #279172

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


Expert's answer

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!

LATEST TUTORIALS
APPROVED BY CLIENTS