Commit 8ceb919e by BellCodeEditor

save project

parent 07858a54
Showing with 25 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
import random
s=turtle.Screen()
p=turtle.Pen()
list=[20,40,50,60,80,100]
d=list[random.randint(0,5)]
list=["pink","blue","green"]
o=list[random.randint(0,2)]
s.bgcolor(o)
p.penup()
p.goto(100,0)
p.write("书到用时方恨少,\n事非经过不知难!",font=("Times",13,"normal"))
p.hideturtle()
p1=turtle.Pen()
p1.pencolor("red")
p1.pensize(10)
p1.left(45)
p1.forward(2*d)
p1.circle(d,180)
p1.right(90)
p1.circle(d,180)
p1.forward(2*d)
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