Python program to display the multiplication table

Configurare noua (How To)

Situatie

This program displays the multiplication table of variable num

Solutie

Pasi de urmat

num = int(input(“Enter a number: “))
for i in range(1, 11):
print(num, ‘x’, i, ‘=’, num*i)

Output:

Enter a number: 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

Tip solutie

Permanent

Voteaza

(3 din 5 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?