Python Create Multiplication Table

preview_player
Показать описание
In this Python tutorial, we will go over how to create a multiplication table.
Рекомендации по теме
Комментарии
Автор

ask=int(input("Enter the table you want to see"))
for i in range(1, 11):
print(ask, '*', i, '=', i*ask)


Enter the table you want to see 5

5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30
5 * 7 = 35
5 * 8 = 40
5 * 9 = 45
5 * 10 = 50

siderealvictor
Автор

That was quick and helpful
Thank you sir!

eda
Автор

is there a replacement for end='\t'

melissajafer
Автор

how was he able to print i and j as well? I'm doing a project and it only displays the products, not the two numbers that get the product:
for row in range(N1, N2+1):
for i in range(0, 10):
col = 1+i*X
print(row*col, "|", end="\t")

(N1, N2, and X are all user inputs)

megd
Автор

Pls help me in this. Python idle 3.7.
Insert list with strings which contain python script to display multiplication table

assthetic
Автор

I can do it in just 5 steps with no nesting and only a loop

bijoymajumder