write a program in Python to find prime factorial of n
Answers
Answered by
3
Answer:
n=int(input("Enter n:"))
if(n==0):
fact=1
fact=1
for i in range(1,n+1):
fact=fact*i
print(fact)
Answered by
0
for is the keyword in python which is used to form a loop whose definite length is known , it does not takes the last value . For example , the above loop will run till the number 'n' entered by the user and not till 'n+1' .
print is the keyword in python programming language . It print anything which is written within it .
input takes the input from the user in the form of string .
int converts the input into integer form .
Similar questions
Science,
5 months ago
Chemistry,
5 months ago
Hindi,
5 months ago
Social Sciences,
11 months ago
Physics,
1 year ago