Print Table Using Program
#Here You will learn how can you print the table by your user which your user want.
In this program only in three steps you can this program
step-1 First you have to enter the number that your user want so you must have to use input() funtion.
Step-2 Then you have to take for loop that you table would be of 1 to 10 multiplication of that number.
Srep-3 After you have to print using table like structure.
In for loop Start from 1 and it goes 10 number
Q.Write a program to print table of any number.
"""WAP to print table of any number.
"""
n=eval(input("Enter a positive integer:"))
for i in range(1,11):
print(n,"X",i,"=",n*i)
This is correct way to write a program in your copy as well as in Spyder |
OUTPUT:Enter a positive integer:11
11 X 1 = 11
11 X 2 = 22
11 X 3 = 33
11 X 4 = 44
11 X 5 = 55
11 X 6 = 66
11 X 7 = 77
11 X 8 = 88
11 X 9 = 99
11 X 10 = 110
how to print table using python coding
Reviewed by Shubham Prajapati
on
February 06, 2021
Rating:
No comments:
If you have any doubt so you can comment me then i will 100% help you ,Through comment Chat