WAP stands for Write A Program
l = ['Mayank', 'Aniket', 'Saurabh', 'Rahul']
Example Input:
Enter the value of n: 5
Enter the value of p: 2
Example Output:
0^2 = 0
1^2 = 1
2^2 = 4
3^2 = 9
4^2 = 16
5^2 = 25
………………………………
t = ('Someone', 34, 'hi', 12.983, 34 +9j)
marksList = [(23, 24, 31), (56, 34, 53), (42, 58, 31)]
t = (23, 45, 67, 90, 12, 10)
t = (23, 45, 67, 90, 12, 10)
"No second digit"
.l = [2, 5, 'a', 5, 'r', 7, 'm', 't', '4']
Write a Python program that takes a number as input from the user and calculates its factorial.
(Factorial of n
is the product of all positive integers from 1
to n
, denoted as n!
.)
Example Input: Enter a number: 5
Example Output: Factorial of 5 is 120
………………………………