TORONTO KIDS COMPUTER CLUB | Aurora Monday 18:30 Python Homework 20.02.17.
17107
post-template-default,single,single-post,postid-17107,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Monday 18:30 Python Homework 20.02.17.

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.

No Comments

Sorry, the comment form is closed at this time.