Commit 701294b3 by BellCodeEditor

auto save

parent 03788ad5
Showing with 6 additions and 22 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("blue") #背景颜色 screen.bgcolor("pink")
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)
Pen1.down() Pen.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)
len=screen.textinput("提示","你有多少爱心:") turtle.done()
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