学习笔记-Python基础4-九九乘法表练习
for row in range(1,10):
for col in range(1,row+1):
print(row * col,end=" ")
print("")
#函数版本
def printLine(row): for col in range(1,row+1): print(row * col,end=" ") print("") for row in range(1,10): printLine(row)
for row in range(1,10):
for col in range(1,row+1):
print(row * col,end=" ")
print("")
#函数版本
def printLine(row): for col in range(1,row+1): print(row * col,end=" ") print("") for row in range(1,10): printLine(row)