Commit a14b2421 by BellCodeEditor

save project

parent 0cc596c9
Showing with 25 additions and 21 deletions
"""
使用turtle模块画图 import turtle
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 pen=turtle.Pen()
""" screen=turtle.Screen()
import turtle screen.bgcolor("pink")
pen.penup()
pen = turtle.Pen() pen.goto(100,-100)
screen = turtle.Screen() pen.write("你好",font=("Times",20,"normal"))
screen.bgcolor("light pink") pen.hideturtle()
colors=["white","blue","violet","cyan"]
# 请创造师在下面接着创作 pen1=turtle.Pen()
distance=1 pen1.pensize(5)
pen.speed(1000) pen1.pencolor("red")
for i in range(1,300): pen1.left(45)
pen.pencolor(colors[i%4]) pen1.forward(100)
pen.forward(i) pen1.circle(50,180)
pen.right(91) pen1.right(90)
# 隐藏画笔,保存画布 pen1.circle(50,180)
pen.hideturtle() pen1.forward(100)
turtle.done()
pen1.hideturtle()
turtle.done()
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