Commit 58179645 by BellCodeEditor

auto save

parent 321f01ab
Showing with 5 additions and 4 deletions
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# 导入turtle模块 # 导入turtle模块
import turtle import turtle
# 创建一支画笔 # 创建一支画笔
len = int(input("你想要多大的心:"))
pen = turtle.Pen() pen = turtle.Pen()
screen = turtle.Screen() screen = turtle.Screen()
screen.bgcolor("pink") screen.bgcolor("pink")
...@@ -15,10 +16,10 @@ pen1.pensize(5) ...@@ -15,10 +16,10 @@ pen1.pensize(5)
pen1.pencolor("red") pen1.pencolor("red")
pen1.begin_fill() pen1.begin_fill()
pen1.left(45) pen1.left(45)
pen1.forward(200) pen1.forward(2*len)
pen1.circle(100,180) pen1.circle(len,180)
pen1.right(90) pen1.right(90)
pen1.circle(100,180) pen1.circle(len,180)
pen1.forward(200) pen1.forward(2*len)
pen1.end_fill() pen1.end_fill()
turtle.done() 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