Commit b0f70762 by BellCodeEditor

save project

parent 32949ac8
Showing with 11 additions and 2 deletions
#导入turtle库 #导入turtle库
import turtle import turtle
# #创建画笔 # #创建画笔
#pen=turtle.Pen() pen1=turtle.Pen()
# 写字 # 写字
# pen.write("诺依你好啊,\nturtle模块真好用,\n我会在画布上写字了",font=("Times",30,"normal")) # pen.write("诺依你好啊,\nturtle模块真好用,\n我会在画布上写字了",font=("Times",30,"normal"))
# #隐藏 # #隐藏
...@@ -23,6 +23,15 @@ import turtle ...@@ -23,6 +23,15 @@ import turtle
#pen1.left(45) #pen1.left(45)
#pen1.forward(100) #pen1.forward(100)
#pen1.circle #pen1.circle
screen=turtle.Screen()
len=screen.textinput("提示","您要多大的爱心呀?")
lovesize=int(len)
pen1.left(45)
pen1.forward(2*lovesize)
pen1.circle(lovesize,180)
pen1.right(90)
pen1.circle(lovesize,180)
pen1.forward(2*lovesize)
len=60 len=60
...@@ -35,7 +44,7 @@ pen1.forward(2*len) ...@@ -35,7 +44,7 @@ pen1.forward(2*len)
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
pen=turtle.Pen() #pen1=turtle.Pen()
pen.penup() pen.penup()
pen.goto(-100,0) pen.goto(-100,0)
pen.write("祝你生日快乐!",font=("Times",30,"normal")) pen.write("祝你生日快乐!",font=("Times",30,"normal"))
......
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