while双循环打印三角形

a=5
b=0
while b<a:横着是行数     外循环,循环行数
	i=0
	while i<=b:竖着
		print("*", end="")
		i+=1
	b+=1
	print()换行

 

posted @ 2021-03-12 22:07  火烧火燎  阅读(201)  评论(0)    收藏  举报