Basic Programs

If Else Programs

While loop Programs

For loop Programs

List Programs


Python Program to Print a Multiplication Table using For Loop


This example shows, how to print multiplication table in given table and limit using for loop in python.

Steps
  1. Get input from user to print the multiplication table from a given limit.
  2. Each iteration of for loop multiplied by the loop counter in each step to display the steps of multiplication table.
Example:
Example.py
table = int(input("Enter the Table : "))    
limit = int(input("Enter the Limit : "))    

for a in range(1,limit+1):
   print(table,'x',a,'=',table*a)  

Output

Enter the Table : 9
Enter the Limit : 10
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
9 x 8 = 72
9 x 9 = 81
9 x 10 = 90

Prev Next