Print Multiplication Table of a given Number in Python


variable name=input("--") # it is use to take input from User in Python
# If the input is integer type then is like 
variblename=int(input(----)
for i in range(1,10) #for loop in Python programming //You can Search on our site For loop in python 
print #it is used to print 
#Day1 Challenge Completed



  1. x=int(input("Enter the number(multiplication table)--"))
  2. for i in range(1, 11):
  3.       print(x,'X',i,'=',x*i)
Output:
     Enter the number(multiplication table)--2

2 X 1 = 2
2 X 2 = 4
2 X 3 = 6
2 X 4 = 8
2 X 5 = 10
2 X 6 = 12
2 X 7 = 14
2 X 8 = 16
2 X 9 = 18
2 X 10 = 20



Comments