Python

Python Program to Display the multiplication Table1 min read

Write a program to Display the multiplication Table in Python

Code:




This Python program takes an input number from the user and displays the multiplication table of that number.

The program starts by asking the user to input a number, which is stored as an integer in the variable “num”.

Then, the program uses a for loop to iterate 10 times. On each iteration, it calculates the product of the input number and the current iteration number and prints the input number, the current iteration number, the symbol “x” and the product of the input number and the current iteration number to the output.

The output will be a list of strings, each one representing one line of the multiplication table of the input number, showing the input number, the current iteration number, the symbol “x” and the product of the input number and the current iteration number.

Take your time to comment on this article.

Leave a Comment