Commit 2e762f3b by BellCodeEditor

save project

parent 7d8213a2
Showing with 4 additions and 2 deletions
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light yellow") screen.bgcolor("light yellow")
len=screen.textinput("提示","爱心大小")
l=float(len)
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(100,0) pen.goto(100,0)
...@@ -17,11 +19,11 @@ pen1.left(45) ...@@ -17,11 +19,11 @@ pen1.left(45)
#8.画右下角的边,长100(直径) #8.画右下角的边,长100(直径)
pen1.forward(100) pen1.forward(100)
#9.画半圆circle() 半径为50 #9.画半圆circle() 半径为50
pen1.circle(50,180) pen1.circle(l,180)
#10.右转90 #10.右转90
pen1.right(90) pen1.right(90)
#11.画半圆circle() 半径为50 ,夹角为180 #11.画半圆circle() 半径为50 ,夹角为180
pen1.circle(50,180) pen1.circle(l,180)
#12.画左下角的边,长100(直径) #12.画左下角的边,长100(直径)
pen1.forward(100) pen1.forward(100)
pen1.hideturtle() pen1.hideturtle()
......
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