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 :-

Leave a Reply

avatar
  Subscribe  
Notify of