Skip to content

Write a Python program to print the multiplication table of 4 | Code

  • by

Using for loop and range() function you can easily print the multiplication table of 4 in Python.

Python example to print the multiplication table of 4

A simple example code used the for loop along with the range() function to iterate 10 times. Print the multiplication table of variable num.

num = 4

for i in range(1, 11):
    print(num, 'x', i, '=', num * i)

Output:

Write a Python program to print the multiplication table of 4

Do comment if you have any doubts or suggestions on this Python multiplication code.

Note: IDE: PyCharm 2021.3.3 (Community Edition)

Windows 10

Python 3.10.1

All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.

Leave a Reply

Discover more from Tutorial

Subscribe now to keep reading and get access to the full archive.

Continue reading