Print Table Using Program
![]() |
Q.Write a program 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
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