Commit f379eb8d by BellCodeEditor

save project

parent c66a449e
Showing with 26 additions and 19 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
import random
list=[10,20,30,40,50]
d=random.choice(list)
a=turtle.Pen()
screen=turtle.Screen()
a.penup()
a.goto(-70,-140)
a.hideturtle()
a.pendown()
len=screen.textinput("请填写:","你想要多大的?(最大85)")
n=int(len)
a.write(len+"步"+"\n好的!",font=("times",40,"normal"))
a1=turtle.Pen()
screen.bgcolor("light blue")
len=screen.textinput("100","100")
len=int(len)
pen=turtle.Pen()
pen.write("你好\nSB.",font=("Times",30,"normal"))
pen.hideturtle()
len=60
pen.penup()
pen.goto(100,100)
pen.pendown()
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
turtle.done()
a1.fillcolor("red")
a1.begin_fill()
a1.hideturtle()
a1.pensize(5)
a1.pencolor("red")
a1.left(45)
a1.forward(2*n)
a1.circle(n,180)
a1.right(90)
a1.circle(n,180)
a1.forward(2*n)
a1.end_fill()
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