Commit c205c362 by BellCodeEditor

save project

parent baf7004d
Showing with 22 additions and 6 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
p=turtle.Pen() p=turtle.Pen()
p.write("你好,\n新年快乐",font=("Times",50,"normal")) p.write("你好,\n新年快乐",font=("Times",50,"normal")) #字体,大小,类型
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("pink") screen.bgcolor("blue") #背景颜色
Pen1=turtle.Pen() Pen1=turtle.Pen()
Pen1.pensize(20) Pen1.pensize(20)
Pen1.pencolor("red") Pen1.pencolor("red")
Pen1.penup() Pen1.penup()
Pen1.goto(-100,50) Pen1.goto(-100,50)
Pen.down() Pen1.down()
Pen1.left(45) Pen1.left(45)
Pen1.forward(100) Pen1.forward(100)
Pen1.circle(50,180) Pen1.circle(50,180) #半径和度数
Pen1.right(90) Pen1.right(90)
Pen1.circle(50,180) Pen1.circle(50,180)
Pen1.forward(100) Pen1.forward(100)
turtle.done() len=screen.textinput("提示","你有多少爱心:")
a=int(len)
Pen1.left(45)
Pen1.forward(2*a)
Pen1.circle(a,180)
Pen1.right(90)
Pen1.circle(a,180)
Pen1.forward(2*a)
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