Write Multiplication Table Using For Loop In Python

Write  Multiplication Table Using For Loop In Python

Code:

Num = int(input("Enter The Number :"))

for i in range (1,11) :
    print(f"{Num}X{i}={Num*i}")
    # or
    # print(Num,"X",i,"=",Num*i)
    # or
    # print(str(Num) + "X" + str(i) + "=" + str(Num*i))

Output:

Enter The Number:4

4X1=4

4X2=8

4X3=12

4X4=16

4X5=20

4X6=24

4X7=28

4X8=32

4X9=36

4X10=40


Download Code

Comments

Popular posts from this blog

Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and User Keys as their Name Assume That The Names Are Unique.

Write Python Program To Store Seven Fruits Name In a List Enter By The User