Program to Print Multiplication Table of a given Number in Python
ADVERTISEMENTS
Program to print multiplication table of a given number in python. In this article, you willl learn how to print multiplication table in python language using for loop.
Source Code
# Program to Print Multiplication Table of a given Number in Python
print ("----Enter the input number is::---\n")
x = int (input ())
print ("\n----Enter the range number is::----\n")
r = int (input ())
# x - To store the input number
# r - To store the multiplication range
print ("\n\n------The above multiplication table--------\n\n")
for i in range (1, r + 1):
print ("\t", x, " * ", i, " = ", x * i)
Output
----Enter the input number is::---
16
----Enter the range number is::----
11
------The above multiplication table--------
16 * 1 = 16
16 * 2 = 32
16 * 3 = 48
16 * 4 = 64
16 * 5 = 80
16 * 6 = 96
16 * 7 = 112
16 * 8 = 128
16 * 9 = 144
16 * 10 = 160
16 * 11 = 176