import turtle
import time
Answer = input("问题:彦淳宝贝,是否愿意和猪猪在一起呀? 选项:愿意/不愿意 ")
if (Answer == "愿意"):
print('你家猪猪也愿意哒!继续往下看呐!')
print('记住一会儿要用的密码:galesnjak')
if (Answer == "不愿意"):
print('哼!那你也继续往下看!呜呜!')
def hart_arc():
for i in range(200):
turtle.right(1)
turtle.forward(2)
def move_pen_position(x, y):
turtle.hideturtle()
turtle.up()
turtle.goto(x, y)
turtle.down()
turtle.showturtle()
love = "彼此相守,烟火人间。"
signature = "彦淳&家楠"
date="农历除夕"
turtle.setup(width=800, height=500)
turtle.color('red', 'pink')
turtle.pensize(3)
turtle.speed(3)
move_pen_position(x=0, y=-180)
turtle.left(140)
turtle.begin_fill()
turtle.forward(224)
hart_arc()
turtle.left(120)
hart_arc()
turtle.forward(224)
turtle.end_fill()
move_pen_position(15,-20)
turtle.hideturtle()
turtle.color('#CD5C5C', 'pink')
turtle.write(love, font=('华文中宋', 20, 'bold'), align="center")
if (signature != '') & (date != ''):
turtle.color('black', 'black')
time.sleep(2)
move_pen_position(220, -140)
turtle.hideturtle()
turtle.write(signature, font=('华文中宋', 20), align="center")
move_pen_position(220, -180)
turtle.hideturtle()
turtle.write(date, font=('华文中宋', 20), align="center")
window = turtle.Screen()
window.exitonclick()
|