Commit 44f4cd0c by BellCodeEditor

save project

parent 0caf7ddd
Showing with 27 additions and 20 deletions
""" impourt turtle
使用turtle模块画图 turtle.penup()
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 turtle.goto(0,-200)
""" turtle.pendown()
import turtle turtle.circle(200)
turtle.penup()
turtle.goto(-100,50)
pen = turtle.Pen() turtle.pendown()
screen = turtle.Screen() turtle.fillcolor('blue')
screen.bgcolor("light pink") turtle.begin_fill()
colors=["white","blue","violet","cyan"] turtle.circle(20)
# 请创造师在下面接着创作 turtle.end_fill()
distance=1 turtle.penup()
pen.speed(1000) turtle.goto(-100,50)
for i in range(1,300): turtle.pendown()
pen.pencolor(colors[i%4]) turtle.fillcolor('blue')
pen.forward(i) turtle.begin_fill()
pen.right(91) turtle.circle(20)
# 隐藏画笔,保存画布 turtle.end_fill()
pen.hideturtle() turtle.penup()
turtle.goto(0,50)
turtle.pendown()
turtle.circle(-50,steps=3)
turtle.penup()
turtle.goto(0,170)
turtle.goto(-150-70)
turtle.done() turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment