您的位置:首页 > 其它

12海龟跑圈

2019-08-07 22:56 691 查看
原文链接:http://www.cnblogs.com/haishangmingdeng/p/11318435.html
import turtle
t=turtle.Turtle()
t.hideturtle()
t.penup()
t.goto(-50,-50)
t.pendown()
t.color('red')
t.width(20)
t.fd(100)
t.circle(50,180)
t.fd(100)
t.circle(50,180)
t1=turtle.Turtle()
t1.color('green')
t1.shape('turtle')
t1.penup()
t1.goto(-50,-50)
num=int(input('请输入圈数'))
for x in range(num):
print('当前是第'+str(x+1)+'圈')
t1.fd(100)
t1.circle(50,180)
t1.fd(100)
t1.circle(50,180)

 

转载于:https://www.cnblogs.com/haishangmingdeng/p/11318435.html

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: