Course Content
How to Add a Virtual Environment in Python
0/1
Set
0/1
Python
About Lesson

(1)Write a program to print “Hello User” four times, each on a new line, with the number preceding the text.

Output:

1.Hello User

2.Hello User

3.Hello User

4.Hello User

5.Hello User

(2).Write a program to print the first 10 natural numbers starting from 1.

Output: 1, 2, 3, 4, 5, 6, 7, 8, 9,10

(3)Write a program to print the first 10 terms of an arithmetic sequence starting from 2, where each number increases by 2.

Output: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20

(4)Write a program to print the first 10 numbers of a sequence where each number is the double of the previous one, starting from 1.

Output: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512

(6)Print sum of all nos upto 10
Output: . 1+2+3+4+5+6+7+8+9+10=55

(7)Print product of all nos upto 5
Output: 5x4x3x2x1=120

(8)Enter a number and print factorial

(9)Enter m and n print product of m “n” times
Output: m=3 and n=4 ans= mxmxmxm=>81

(10) Sum of Digits    

(11) Reverse of Digits

(12) Print a number to Word 123=> One Two Three