随笔 -
317
文章 -
93
评论 -
22
正方向
height = int(input("please input height:"))
tmp= 1
while tmp <=height:
width=tmpwhile width >0:print("*", end="")
width-= 1
print("")
tmp+= 1
测试结果:
反方向:
height = int(input("please input height:"))while height >0:
tmp=heightwhile tmp >0:print("*",end="")
tmp-= 1
print()
height-= 1
测试结果:
posted @
2018-03-11 10:30
klvchen
阅读(4206)
评论(0)
编辑
收藏
Copyright © 2020 klvchen
Powered by .NET 5.0.0 on Kubernetes