Python Program to Print Multiplication Table

« Previous Program Next Program »

Print Multiplication Table in Python

To print multiplication table of any number in python, you have to first ask from user to enter the number and start calculating its table to print the multiplication table of the given number as shown in the program given below.

Python Programming Code to Print Multiplication Table

Following python program ask from user to enter a number and prints multiplication table of that number:

# Python Program - Print Multiplication Table of a Number
while True:
	print("Enter 'x' for exit.")
	num = input("Enter a number: ")
	if num == 'x':
		number = int(num)
		for i in range(1, 11):
			print(number, "*", i, "=", number*i)

Here is the sample run of the above python program to illustrates how to print multiplication table of any number:

python print multiplication table

Same Program in Other Languages

You may also like to learn or practice the same program in other popular programming languages:

« Previous Program Next Program »


Quick Links
Signup - Login - Give Online Test