Table of any number in Python

Python tutorial to print table of any number
n=int(input("Enter n :"))
for i in range(1,11):
     print(n,"x",i,"=",i*n)
#Output
Enter n :4
4 x 1 = 4
4 x 2 = 8
4 x 3 = 12
4 x 4 = 16
4 x 5 = 20
4 x 6 = 24
4 x 7 = 28
4 x 8 = 32
4 x 9 = 36
4 x 10 = 40

Leave a Reply