Commit 7ad30933 by BellCodeEditor

save project

parent 305ad42f
Showing with 12 additions and 7 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
a=50
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("red") screen.bgcolor("red")
ien=screen.textinput("提示","你想要多大的爱心呀?")
len=int(ien)
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(100,-100) pen.goto(100,-100)
pen.write("诺依,\nturtle真好用,\n我会在画布上写字啦",font=("Times",20,"normal")) pen.write("诺依,\nturtle真好用,\n我会在画布上写字啦",font=("Times",20,"normal"))
pen.hideturtle() pen.hideturtle()
pen1=turtle.Pen() pen1=turtle.Pen()
pen.fillcolor("red")
pen.begin_fill() pen1.left(45)
pen.end_fill() pen1.forward(len*2)
for i in range(3) pen1.circle(len,180)
pen1.right(90)
\ No newline at end of file pen1.circle(len,180)
pen1.forward(len*2)
turtle.done()
\ No newline at end of file
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