0
787views
Write a Python Program to Display the multiplication Table
1 Answer
0
24views

In the program below, we have used the for loop to display the multiplication table of 12.

To iterate 10 times, for loop along with the range() function is used. The arguments inside range function is (1, 11) meaning, greater than or equal to 1 and less than 11 (meaning 10).

Code:-

num=int(input("Display multiplication table of? "))
for i in range(1, 11):
    print(num,'x',i,'=',num*i)

Output:-

enter image description here

enter image description here

Please log in to add an answer.