Let’s learn Python program to print multiplication table of any number.
Python program to print multiplication table of any number
Python program to print multiplication table of a given number is the most asked interview question.
To print multiplication table for any number user enters a number as input
In the next step using for loop from one to ten to generate multiplication of user entered number.
Now let’s see program to print multiplication table of any number.
Python Code:
1 2 3 4 5 6 7 8 9 | # Python Program to Print Multiplication Table of a Number num = int(input("Enter the number: ")) print("Multiplication Table of", num) for i in range(1, 11): print(num,"X",i,"=",num * i) |
Output: