Commit 126fb2c9 by BellCodeEditor

auto save

parent 3fcae27f
Showing with 19 additions and 8 deletions
import turtle
import random
# pen=turtle.Pen()
# pen.write("今日作业:\n完成Lv2-2的实践应用\n第三题\n第四题",font=("Times",20,"normal"))
# pen.hideturtle()
# turtle.done()
bg=turtle.Screen()
bg.bgcolor("pink")
list=[]
for i in range(100):
list.append(i)
len=random.choice(list)
len1=random.randint(1,100)
pen=turtle.Pen()
pen.penup()
pen.goto(-100,-200)
pen.write("今日作业:\n完成Lv2-2的实践应用\n第三题\n第四题",font=("Times",20,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen1.color("red")
pen1.pensize(10)
pen1.left(45)
pen1.fd(100)
pen1.circle(50,180)
pen1.fd(len*2)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(50,180)
pen1.fd(100)
pen1.circle(len,180)
pen1.fd(len*2)
pen1.hideturtle()
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