Commit ebb854fc by BellCodeEditor

save project

parent a4ee4c40
Showing with 8 additions and 6 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
len=100
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("pink") len=screen.textinput("kxfmdrgv","多大?????")
sb=float(len)
screen.bgcolor("light blue")
pen.penup() pen.penup()
pen.goto(100,-100) pen.goto(100,-100)
pen.write("诺依是谁,\n我不认识。",font=("Times",20,"normal")) pen.write("诺依是谁,\n我不认识。",font=("Times",20,"normal"))
...@@ -11,10 +12,10 @@ pen1=turtle.Pen() ...@@ -11,10 +12,10 @@ pen1=turtle.Pen()
pen1.pensize(8) pen1.pensize(8)
pen1.pencolor("purple") pen1.pencolor("purple")
pen1.left(45) pen1.left(45)
pen1.forward(len*2) pen1.forward(sb*2)
pen1.circle(len,180) pen1.circle(sb,180)
pen1.right(90) pen1.right(90)
pen1.circle(len,180) pen1.circle(sb,180)
pen1.forward(len*2) pen1.forward(sb*2)
pen1.hideturtle() pen1.hideturtle()
turtle.done() 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