21 Feb Aurora Monday 18:30 Python Homework 20.02.17.
Question :
In mathematics, the factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n:
n!=n*(n-1)*(n-2)*(n-3)*…*3*2*1
For example,
5!=5*4*3*2*1=120
Write a function to find the factorial of a number. The function should take one number as an argument and print the factorial of that number
Sample Input:
5
Sample Output:
120
Hint:
the factorial of 5 is 1 * 2 * 3 * 4 * 5 = 120 and also use loops inside the function.
Sorry, the comment form is closed at this time.