diy1.py
948 Bytes
import turtle
screen = turtle.Screen()
screen.bgcolor("pink")
pen = turtle.Pen()
len1 = screen.textinput("姓名","你的名字是")
pen.up()
pen.goto(100,-100)
pen.write(len1,font=("Times",10,"normal"))
pen.goto(0,0)
pen.down()
pen.pensize(10)
pen.pencolor("red")
pen.left(45)
pen.forward(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(100)
pen.hideturtle()
turtle.done()