Commit 4a1cc0c1 by BellCodeEditor

save project

parent 9230f374
Showing with 8 additions and 8 deletions
...@@ -2,25 +2,24 @@ ...@@ -2,25 +2,24 @@
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("pink") screen.bgcolor("pink")
len=screen.textinput("提示","你想要多大的心?")
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(25,-50) pen.goto(0,-100)
pen.write("春晓\n春眠不觉晓,处处闻啼鸟。\n夜来风雨声,花落知多少。",font=("times",20,"normal")) pen.write("春晓\n春眠不觉晓,处处闻啼鸟。\n夜来风雨声,花落知多少。",font=("times",20,"normal"))
pen.hideturtle() pen.hideturtle()
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.penup() lovesize=int(len)
pen1.goto(-80,0)
len=75
pen1.pensize(5) pen1.pensize(5)
pen1.pencolor("red") pen1.pencolor("red")
pen1.fillcolor("red") pen1.fillcolor("red")
pen1.begin_fill() pen1.begin_fill()
pen1.left(45) pen1.left(45)
pen1.forward(2*len) pen1.forward(2*lovesize)
pen1.circle(len,180) pen1.circle(lovesize,180)
pen1.right(90) pen1.right(90)
pen1.circle(len,180) pen1.circle(lovesize,180)
pen1.forward(2*len) pen1.forward(2*lovesize)
pen1.end_fill() pen1.end_fill()
pen1.hideturtle() pen1.hideturtle()
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