Python Program to print multiplication table of a number | Display the multiplication table of a number entered by user

Python Program to Print Multiplication Table of a given Number

technology topper

In this example, you will learn to generate the multiplication table of a number entered by the user. In this program we will use for loop to generate multiplication table of number which is provided by user.

Python program:
num = int(input("Enter the number: "))
print("Multiplication Table of", num)
# Iterate 10 times from i = 1 to 10
for i in range(111):
   print(num,"X",i,"=",num * i)


Output:
Enter the number: 9 Multiplication Table of 9 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


Run Code: If you want run this code copy this code, paste here and run.

No comments: