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

Simple example code used the for loop along with the range() function to iterate 10 times. Print the 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 and suggestions on this Python multiplication code.

Note: IDE: PyCharm 2021.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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.