Commit 1cf168f9 by BellCodeEditor

save project

parent c37d8d8b
Showing with 7 additions and 6 deletions
# 利用write()帮助悟空给诺依回信吧~
import random
import turtle
f=[45,50,40,31,22,40.31,22.5]
f=["green","pink","light blue","red","blue","yello"]
Len=random.choice(f)
screen=turtle.Screen()
screen.bgcolor("light blue")
screen.bgcolor(Len)
W=int(screen.textinput("大小","请输入爱心大小"))
pen=turtle.Pen()
pen.penup()
pen.goto(-50,-150)
......@@ -14,11 +15,11 @@ pen.goto(0,0)
pen1.pencolor("red")
pen1.pensize(10)
pen1.setheading(45)
pen1.forward(2*Len)
pen1.circle(Len,180)
pen1.forward(2*W)
pen1.circle(W,180)
pen1.left(-90)
pen1.circle(Len,180)
pen1.forward(2*Len)
pen1.circle(W,180)
pen1.forward(2*W)
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