Commit 4bb1b109 by BellCodeEditor

auto save

parent c816b9b8
Showing with 30 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
s=turtle.Screen()
s.bgcolor("light blue")
a=s.textinput("提示","你想要多大的爱心,数字不要超过150")
num=int(a)
pen=turtle.Pen()
pen.penup()
pen.forward(100)
pen.pendown()
pen.write("有的人活着,\n他已经死了。\n有的人死了,\n他还活着。\n诺依,\n你是第一种。\n",font=("Times",20,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen1.penup()
pen1.goto(-100,-100)
pen1.pendown()
pen1.pensize(4)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(num*2)
pen1.circle(num,180)
pen1.right(90)
pen1.circle(num,180)
pen1.forward(num*2)
pen1.hideturtle()
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