Commit 21b11fa2 by BellCodeEditor

save project

parent c66a449e
Showing with 19 additions and 19 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("yellow")
len=screen.textinput("100","100") p=turtle.Pen()
len=int(len) p.penup()
pen=turtle.Pen() p.goto(100,-100)
pen.write("你好\nSB.",font=("Times",30,"normal")) p.write("但愿人长久,\n千里共婵娟。\n——某位诗人",font=("Times",20,"normal"))
pen.hideturtle() n=screen.textinput("画爱心","你想画多大的爱心?")
len=60 r=int(n)
pen.penup() z=turtle.Pen()
pen.goto(100,100) z.pensize(5)
pen.pendown() z.pencolor("red")
pen.pensize(5) z.left(45)
pen.pencolor("red") z.fd(2*r)
pen.left(45) z.circle(r,180)
pen.forward(2*len) z.right(90)
pen.circle(len,180) z.circle(r,180)
pen.right(90) z.fd(2*r)
pen.circle(len,180) z.hideturtle()
pen.forward(2*len)
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