19 lines
498 B
Python
19 lines
498 B
Python
|
#Program: multiplicationTable_v2.py (Report comments/bugs to chikh@yuntech.edu.tw)
|
||
|
#Function:
|
||
|
|
||
|
print("\n九九乘法表\n")
|
||
|
|
||
|
print(" |",end='')
|
||
|
for i in range(1,10):
|
||
|
print(" ",i,end='')
|
||
|
print("\n----+-----------------------------------------------")
|
||
|
for i in range(1,10):
|
||
|
print(" ",i,"|",end='')
|
||
|
for j in range(1,10):
|
||
|
if j < i:
|
||
|
print(" ",end='')
|
||
|
continue
|
||
|
print(" " if i*j < 10 else " ",i*j,end='')
|
||
|
print()
|
||
|
print("----+-----------------------------------------------")
|