Python Program to Display the multiplication Table

Spread the love

In this tutorial, you will learn how to write Python Program to Display the multiplication Table.

We will use for loop with range function to write program.

Program:

number = 10 for i in range(1, 11): print(number,'x',i,'=',number*i)

Output:

10 x 1 = 10
10 x 2 = 20
10 x 3 = 30
10 x 4 = 40
10 x 5 = 50
10 x 6 = 60
10 x 7 = 70
10 x 8 = 80
10 x 9 = 90
10 x 10 = 100

By using user input variable:

number = int(input("enter value for multiplication table")) for i in range(1, 11): print(number,'x',i,'=',number*i)

Output:

enter value for multiplication table 5
5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50
admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *