跟着思路走:
1.先学会打印小星星
方法一:简单的
i = 1
while i <=9:
print(" * "*i)
i += 1
控制台
方法二:利用while嵌套;
row = 1
while row <= 9:
col = 1
while col <= row:
print("*",end="\t") #打印小星星
col += 1
print("")
row += 1
看效果
标签:九九乘法,小星星,打印,嵌套,while,print,col,row
来源: https://blog.51cto.com/u_14303514/2929924