Commit 2a964996 by BellCodeEditor

save project

parent 30297320
Showing with 7 additions and 7 deletions
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
len=screen.textinput("100","100") len=screen.textinput("提示","爱心的大小是多少 ")
len=int(len) a=float(len)
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(100,-50) pen.goto(100,-50)
pen.down() pen.down()
pen.write("你好\n.sb",font=("Times",30,"normal")) pen.write("你好\n.sb",font=("Times",30,"normal"))
len=60
pen.penup() pen.penup()
pen.goto(0,0) pen.goto(0,0)
pen.down() pen.down()
pen.pencolor("red") pen.pencolor("red")
pen.pensize(5) pen.pensize(5)
pen.left(45) pen.left(45)
pen.forward(2*len) pen.forward(2*a)
pen.circle(50,180) pen.circle(a,180)
pen.right(90) pen.right(90)
pen.circle(len,180) pen.circle(a,180)
pen.forward(2*len) pen.forward(2*a)
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