To get table of any number by using while loop

num = int(input("Enter any number: "))
print("Table of ",num)
i = 1
while i<11:
print(num*i)
i = i + 1

1 Like

Very nice, well done , now try to print a range of tables, for e.g tables from 1 to 10.

1 Like

for i in range(1,11):
for j in range(1,11):
mul=i*j
if mul <= 9:
print(mul,end=" “)
else:
print(mul,end=” ")
print()

1 Like

@souravkrsheel99

Correct, keep it up.
Keep Practicing.

1 Like

thank you… all these are already taught in the live lecture…

2 Likes

number = int(input(“Enter a multiplication table:”)
i=1
print (" The multiplication table:,number)
while1<11:
print(num*i)
i=i+1

2 Likes

@dhanashrip930

Correct, keep it up.
Keep Practicing.