Commit 29a0651e by BellCodeEditor

auto save

parent c2f1308f
Showing with 25 additions and 2 deletions
# 利用write()帮助悟空给诺依回信吧~
\ No newline at end of file
#利用write()帮助悟空给诺依回信吧~
import turtle
pen=turtle.Pen()
len=100
pen.penup()
pen.goto(100,-100)
pen.write('你好呀',font=("times",20,"normal"))
screen=turtle.Screen()
screen.bgcolor('pink')
len=screen.textinput('爱心大小','你要多大的爱心')
len=int(len)
#import turtle
pen1=turtle.Pen()
pen1.fillcolor('red')
pen1.color('red')
pen1.begin_fill()
pen1.left(45)
pen1.forward(len)
pen1.circle(len/2,180)
pen1.right(90)
pen1.circle(len/2,180)
pen1.forward(len)
pen1.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