Page 47 - tp_Modula_v2.0
P. 47
On running the above program, you will get the following output:
Output
Enter your name: Orange
Orange
Orange
Orange
Orange
Orange
Program 4: To print multiplication table of an input number.
Program4.py
File Edit Format Run Options Window Help
# program to calculate multiplication table of a number
num = int(input('Enter a number: '))
for i in range (1, 11):
print(num * i)
On running the above program, you will get the following output:
Output
Enter a number: 18
18
36
54
72
90
108
126
144
162
180
Looping Statements in Python 45

