Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 63)
63.
How can you print the factorial of a number entered by the user?
print(factorial(int(input("Enter a number: "))))
user_input = get_user_input(); print(calculate_factorial(user_input))
num = input("Enter a number: "); print(fact(num))
print("Factorial:", compute_fact(input()))
Answer: Option
Explanation:
To print the factorial of a number entered by the user, use print(factorial(int(input("Enter a number: ")))).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.