Commit b7f8aa1e by BellCodeEditor

auto save

parent 07858a54
Showing with 26 additions and 0 deletions
import turtle
#背景
screen = turtle.Screen()
screen.bgcolor("light blue")
len = screen.textinput("爱心","你想多大的爱心,请输入:")
#写诗
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("我们都是中国人!\n们都爱中国!",font=("Times",30,"normal"))
pen.hideturtle()
#画爱心
pen1 = turtle.Pen()
pen1.pencolor("red")
pen1.pensize(5)
newlen = int(len)
pen1.left(45)
pen1.forward(2*newlen)
pen1.circle(newlen,180)
pen1.right(90)
pen1.circle(newlen,180)
pen1.forward(2*newlen)
pen1.hideturtle()
#保存
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