Commit ada5d339 by BellCodeEditor

auto save

parent c2f1308f
Showing with 34 additions and 2 deletions
# 利用write()帮助悟空给诺依回信吧~
\ No newline at end of file
import turtle
def love(len):
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
screen = turtle.Screen()
screen.bgcolor("light blue")
pen = turtle.Pen()
pen.color("red")
pen.pensize(5)
# 画爱心
size = float(screen.textinput("提示2","你想画多大的爱心呢?"))
pen.fillcolor("red")
pen.begin_fill()
love(size)
pen.end_fill()
pen.hideturtle()
# 写文字
pen1 = turtle.Pen()
pen1.pencolor("purple")
pen1.penup()
pen1.goto(-100,-100)
text = screen.textinput("提示2","你想写点什么?")
pen1.write(text,font=("Times",18,"normal"))
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