Python program for multiplication table exmaple
Simple example code will print the multiplication table of the user given number (from 1 to 10) by using them for a loop.
We are using “for loop” to iterate the multiplication 10 times. The range() functions are (1, 11) equal to greater than or equal to 1 and less than 11.
num = int(input("Enter the number table: ")) for count in range(1, 11): print(num, 'x', count, '=', num * count)
Output: Print the multiplication table of variable num (which is 11 in our case).
Do comment if you have any doubts and suggestions on this Python table program code.
Note: IDE: PyCharm 2021.1.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.