2条回答 默认 最新
- 当作看不见 2016-11-08 11:31关注
#!/usr/bin/python # -*- coding: UTF-8 -*- import math def pr(i): #输出## if i>0: i=i*2 elif i<0: i*=-1; str="" while i>0: str+="#"; i-=1; print str; sin = math.sin pi = math.pi for i in range(31): x = float(i) / 30.0 * 2 * pi y=sin(x)*20 pr(y)
解决 无用评论 打赏 举报