Commit 6737f8b3 by BellCodeEditor

save project

parent 120377ec
Showing with 7 additions and 5 deletions
...@@ -3,12 +3,14 @@ import turtle ...@@ -3,12 +3,14 @@ import turtle
#Pen.write("诺依,turtle真好用,我会在画布上写字啦") #Pen.write("诺依,turtle真好用,我会在画布上写字啦")
pen=turtle.Pen() #创建画笔 pen=turtle.Pen() #创建画笔
screen=turtle.Screen() screen=turtle.Screen()
tuple.done() #tuple.done()
screen.bgcolor("pink") screen.bgcolor("pink")
size=screen.textinput("提示","你想要多大的爱心")
len=int(size)
pen.left(45) #左转45度 pen.left(45) #左转45度
pen.forward(100) #移动100步 pen.forward(2*len) #移动100步
pen.circle(50,180) #画半圆 pen.circle(len,180) #画半圆
pen.right(90) #右转90度 pen.right(90) #右转90度
pen.circle(50,180) #画半圆 pen.circle(len,180) #画半圆
pen.forward(100) #移动100步 pen.forward(2*len) #移动100步
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