Commit 203ef608 by BellCodeEditor

save project

parent 72dbe128
Showing with 19 additions and 17 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
pen1=turtle.Pen()
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("yellow")
len=screen.textinput("提示","你想要多大的爱心呀?") len=screen.textinput("提示框","请输入爱心大小")
len=int(len) lovesize=int(len)
pen1.penup()
pen1.goto(100,0)
pen1.write("你好呀!\n我是谭博文",font=("times",30,"normal"))
pen1.hideturtle()
pen=turtle.Pen() pen=turtle.Pen()
pen.write("你好\n诺依.",font=("Times",30,"normal"))
pen.hideturtle()
len=60
pen.penup()
pen.goto(100,100)
pen.pendown()
pen.pensize(5) pen.pensize(5)
pen.pencolor("red") pen.pencolor("blue")
pen.left(45) pen.left(45)
pen.forward(2*len) pen.forward(2*lovesize)
pen.circle(len,180) pen.circle(lovesize,180)
pen.right(90) pen.right(90)
pen.circle(len,180) pen.circle(lovesize,180)
pen.forward(2*len) pen.forward(2*lovesize)
turtle.done() pen.hideturtle()
\ No newline at end of file turtle.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