92.6k views
6 votes
Write a python program that prints the multiplication table of 9 ?​

2 Answers

6 votes

for x in range(13):

print(str(x)+" * 9 = "+str(x*9))

I've written my code in python 3.8. This prints out the whole multiplication table of 9 up to 12. If you want to get more or less numbers, you can always change the 13 higher or lower. For instance, if the 13 was 9, you would get the numbers 0 through 8. This is what my code outputs right now.

0 * 9 = 0

1 * 9 = 9

2 * 9 = 18

3 * 9 = 27

4 * 9 = 36

5 * 9 = 45

6 * 9 = 54

7 * 9 = 63

8 * 9 = 72

9 * 9 = 81

10 * 9 = 90

11 * 9 = 99

12 * 9 = 108

User MBN
by
6.0k points
10 votes
x = int(input(“Enter a number”))
table = x * 9
print table

#For the number inputed it will output that number multiplied by 9
User Brian Patton
by
6.7k points