Write a python program to find factorial of 5 with output
Answers
Answered by
3
Answer:
1.num = int(input("enter a number: "))
2.fac = 1.
3.for i in range(1, num + 1):
4.fac = fac * i.
5.print("factorial of ", num, " is ", fac)
Explanation:
plzzzzzz me as brainlist
Answered by
2
def factorial_5():
factorial = 1
for i in range(1, 6):
factorial *= i
return factorial
print("factorial of 5:", factorial_5())
Similar questions
Hindi,
30 days ago
English,
30 days ago
Hindi,
30 days ago
Computer Science,
1 month ago
English,
1 month ago
English,
7 months ago
Economy,
7 months ago
Social Sciences,
7 months ago