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)
Do comment if you have any doubts or suggestions on this Python multiplication code.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.