Commit 1b487733 by BellCodeEditor

auto save

parent b4d6ae33
Showing with 23 additions and 29 deletions
import turtle
#写字 # screen = turtle.Screen()
# pen=turtle.Pen() # screen.bgcolor("light pink")
# pen.pencolor("blue") # pen.penup()
# pen.write("白姝云我爱你!!!",font=("Times",30,"normal")) # pen.goto(100,-100)
# pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",13,"normal"))
# pen.hideturtle() # pen.hideturtle()
pen=turtle.Pen() # #画爱心
screen = turtle.Screen() # pen1=turtle.Pen()
screen.bgcolor("light pink") # pen1.pencolor("red")
pen.penup() # pen1.pensize(5)
pen.goto(100,-100) # def love(len):
pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",13,"normal")) # pen1.left(45)
pen.hideturtle() # pen1.forward(2*len)
#画爱心 # pen1.circle(len,180)
pen1=turtle.Pen() # pen1.right(90)
pen1.pencolor("red") # pen1.circle(len,180)
pen1.pensize(5) # pen1.forward(2*len)
def love(len): # len = screen.textinput("提示","你想要多大的爱心呀?")
pen1.left(45) # lensize = int(len)
pen1.forward(2*len) # love(lensize)
pen1.circle(len,180) # pen1.hideturtle()
pen1.right(90) # turtle.done()
pen1.circle(len,180)
pen1.forward(2*len)
len = screen.textinput("提示","你想要多大的爱心呀?")
lensize = int(len)
love(lensize)
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