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
Comments
Post a Comment