Commit ee5fcd2c by BellCodeEditor

auto save

parent 8740163d
Showing with 21 additions and 23 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("light blue")
pen.penup()
pen.goto(100,-100)
pen.write("Hi, \npython真有趣",font=("Times",18,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen1.pensize(5)
len=screen.textinput("提是","多大")
lovesize=int(len)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*lovesize)
pen1.circle(lovesize,180)
pen1.right(90)
pen1.circle(lovesize,180)
pen1.forward(2*lovesize)
pen1.hideturtle()
turtle.done()
\ No newline at end of file
import turtle as t
t.penup()
t.goto(0,-50)
t.pendown()
t.fillcolor("red")
t.begin_fill()
t.circle(50)
t.end_fill()
t.fd(50)
t.left(90)
t.fd(100)
t.left(90)
t.fd(100)
t.left(90)
t.fd(100)
t.left(90)
t.fd(50)
t.hideturtle()
t.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