Commit f8d601ab by BellCodeEditor

save project

parent 619141e3
Showing with 8 additions and 8 deletions
import turtle import turtle
len=50
pen=turtle.Pen() pen=turtle.Pen()
pen1=turtle.Pen() pen1=turtle.Pen()
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
len=screen.textinput("爱心大小","请输入你的大小")
pen.penup() pen.penup()
pen.write("你好",font=("Times",30,"normal")) pen.write("你好",font=("Times",30,"normal"))
pen1.hideturtle() pen.hideturtle()
pen.goto(-100,0) pen.goto(-100,0)
pen.pendown() pen.pendown()
pen.pencolor("red") pen.pencolor("red")
pen.pensize(int(len))
pen.left(45) pen.left(45)
pen.forward(100) pen.forward(2*int(len))
pen.circle(len,180) pen.circle(int(len),180)
pen.right(90) pen.right(90)
pen.circle(len,180) pen.circle(int(len),180)
pen.forward(100) pen.forward(2*int(len))
pen.hideturtle() pen.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