用户:锦廷查看:0 回复:0 评论:0 创建时间:2023-01-07T08:21:38
【作品展示】

【作品介绍】
龟龟移动
【作品源代码】
from turtle import*
speed(1)
w=['海龟来了','OMG','超级神龟','海龟龟龟龟']
col=['red','yellow','green','skyblue']
bgcolor('pink')
penup()
goto(0,200)
pendown()
for x in range(4):
pencolor(col[x])
write(w[x],font=('宋体',20))
penup()
rt(90)
fd(25)
lt(90)
pu()
goto(0,0)
pd()
clear()
t1=Pen()
t2=Pen()
t3=Pen()
t4=Pen()
t1.shape('turtle')
t2.shape('turtle')
t3.shape('turtle')
t4.shape('turtle')
t1.seth(0)
t2.seth(90)
t3.seth(180)
t4.seth(270)
t1.pencolor('red')
t2.pencolor('yellow')
t3.pencolor('green')
t4.pencolor('skyblue')
t1.fd(200)
t2.fd(200)
t3.fd(200)
t4.fd(200)
t1.circle(50,steps=4)
t2.circle(50,steps=3)
t3.circle(50,steps=6)
t4.circle(50,steps=5)
done()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn