accept a no. from the user and print the table of that no. in python
Answers
Answer:
num = int(input("Enter the number: "))
num = int(input("Enter the number: "))print("Multiplication Table of", num)
num = int(input("Enter the number: "))print("Multiplication Table of", num)for i in range(1, 11):
num = int(input("Enter the number: "))print("Multiplication Table of", num)for i in range(1, 11): print(num,"X",i,"=",num * i)
It was fun coding this for you, please mark me as the brainliest if it helped..
Output:
Enter the Number : (Example 2) 2
Multiplication Table of 2:
2x1 - 2
2x2 - 4
2x3 - 6
2x4 - 8
2x5 - 10 upto 2x10
Your Program in Python:
n = int(input("Enter the number: "))
for x in range(1, 11):
print(n, "X", x, "=", n*x)
Output:
Enter the number: 12
12 X 1 = 12
12 X 2 = 24
12 X 3 = 36
12 X 4 = 48
12 X 5 = 60
12 X 6 = 72
12 X 7 = 84
12 X 8 = 96
12 X 9 = 108
12 X 10 = 120