TORONTO KIDS COMPUTER CLUB | Aurora Wednesday Saturday Python Homework 20.04.15.
17361
post-template-default,single,single-post,postid-17361,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Aurora Wednesday Saturday Python Homework 20.04.15.

17 Apr Aurora Wednesday Saturday Python Homework 20.04.15.

Question 1:
Factorial of any number n is represented by n! and is equal to 1*2*3*….*(n-1)*n. for example:
4! = 1*2*3*4 = 24
3! = 3*2*1 = 6
2! = 2*1 = 2
Also,
1! = 1
0! = 1
Write a program to calculate factorial of a given number.


Question 2:
Create a loop between 1 to 20. Print “fizz” if the number is divisible by 3 and “bizz” when the number is divisible by 5 and “fizzbizz” if a number is divisible by both 3 and 5 . if none of this condition match print the number.

No Comments

Sorry, the comment form is closed at this time.