Python Basics : Multiplication Table

Multiplication Table From 0 to 15.

Python Code :-

#multiplication table from 0 to 15
 print(" ",end="")
 for i in range(16):
 print("%5d|"%i, end="")

print()
 print("______" * 17)

for i in range(16):
 print("%5d|"%i, end="")

for j in range(16):
 print("%5d|"%(i*j), end="")

print()

Output :-

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x