Multiplication Table in Python.
num = int(input("Show the multiplication table : "))
# multiplication 10 times
for i in range(1,11):
print(num,'*' ,i ,'=', num*i)
OUTPUT
10 * 1 = 10
10 * 2 = 20
10 * 3 = 30
10 * 4 = 40
10 * 5 = 50
10 * 6 = 60
10 * 7 = 70
10 * 8 = 80
10 * 9 = 90
10 * 10 = 100
No comments:
Post a Comment
Please do not any spam link in Comment Box