目录
1.打印小星星
方法一:while循环
i=1
while i<=5:
print(i*'*')
i+=1
方法二:while嵌套循环
while i <= 5:
j = 1
while j <= i:
print('*', end='')
j += 1
print()
i += 1
2.打印一颗圣诞树
i = 1
while i <= 5:
print((5 - i) * ' ', (2 * i - 1) * '*')
i += 1
i = 1
w