TORONTO KIDS COMPUTER CLUB | Wednesday Friday 15:00 Python Practice 20.08.07.
18112

Wednesday Friday 15:00 Python Practice 20.08.07.

09 Aug Wednesday Friday 15:00 Python Practice 20.08.07.

Question:

Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:

```Sample Input:
Which multiplication table would you like? 5

Sample Output:
5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50```
• Jesse Shi
Posted at 00:55h, 11 August Reply

num = int(input(“Which multiplication table would you like?: “))

print(“Multiplication Table of”, num)
for i in range(1, 10):
print(num,”X”,i,”=”,num * i)

• Ethan Li
Posted at 18:23h, 12 August Reply

print(‘Which multiplication table would you like?’)
if i:
for i in range(i*1, i*11, i):
print(i, ‘x 1=’, i*1)
print(i, ‘x 2=’, i*2)
print(i, ‘x 3=’, i*3)
print(i, ‘x 4=’, i*4)
print(i, ‘x 5=’, i*5)
print(i, ‘x 6=’, i*6)
print(i, ‘x 7=’, i*7)
print(i, ‘x 8=’, i*8)
print(i, ‘x 9=’, i*9)
print(i, ‘x 10=’, i*10)

IM NOT SURE IF THIS IS RIGHT; I RAN IT AND IT WAS WRONG BUT IM NOT SURE HOW TO FIX