Commit 23d8be74 by BellCodeEditor

save project

parent f8cc0e38
Showing with 8 additions and 6 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
len=screen.textinput("数值","请输入爱心大小数字")
lovesize=int(len)
pen=turtle.Pen() pen=turtle.Pen()
screen.bgcolor("pink") screen.bgcolor("pink")
pen.penup() pen.penup()
pen.goto(100,-100) pen.goto(100,-250)
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.pencolor("red") pen1.pencolor("red")
pen1.pensize(200) pen1.pensize(1)
pen.shape("turtle") pen.shape("turtle")
pen.hideturtle() pen.hideturtle()
text="早上好!\n各位小伙伴" text="早上好!\n各位小伙伴"
pen.write(text,font=("Times",30,"normal")) pen.write(text,font=("Times",30,"normal"))
pen1.hideturtle() pen1.hideturtle()
pen1.left(45) pen1.left(45)
pen1.forward(100) pen1.forward(2*lovesize)
pen1.circle(50,180) pen1.circle(lovesize,180)
pen1.right(90) pen1.right(90)
pen1.circle(50,180) pen1.circle(lovesize,180)
pen1.forward(100) pen1.forward(2*lovesize)
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