笔记之九九乘法表
打印阶梯星星

# * # ** # *** # **** # ***** # ****** # ******* # ******** # ********* # row = 1 # # while row <= 9: # col = 1 # while col <= row: # print('*', end="") # col += 1 # print('') # row += 1
打印九九乘法表( 采用while循环嵌套, row 在外层循环, col在内存循环,col每次循环的能取的最大值是当前row)
row = 1 while row <= 9: col = 1 while col <= row: print('{} * {} = {}'.format(col, row, col * row), end="\t") col += 1 print('') row += 1
\t 是制表符