表白用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import turtle
import time
# 爱心的顶部
def LittleHeart():
for i in range(200):
turtle.right(1)
turtle.forward(2)
#输入表白语句
love = input('输入表白语句,默认I Love You:')
me = input("输入署名或者赠给谁,没有不执行:")
if love ==" ":
love = "I Love You"
#窗口大小
turtle.setup(width=900,height=500)
turtle.color("red","pink")
turtle.pensize(3)
turtle.speed(1)
turtle.up()
turtle.hideturtle()
turtle.goto(0,-180)
turtle.showturtle()
turtle.down()
turtle.speed(1)
turtle.begin_fill()
turtle.left(140)
turtle.forward(224)
LittleHeart()
turtle.left(120)
LittleHeart()
turtle.forward(224)
turtle.end_fill()
turtle.pensize(5)
turtle.up()
turtle.hideturtle()
turtle.goto(0,0)
turtle.showturtle()
turtle.color('#CD5C5C','pink')
turtle.write(love,font=('gungsuh',30),align="center")
turtle.up()
turtle.hideturtle()
time.sleep(2)
turtle.goto(0,0)
turtle.showturtle()
turtle.color('red','pink')
turtle.write(love,font=('gungsuh',30),align="center")
turtle.up()
turtle.hideturtle()
if me != ' ':
turtle.color('black','pink')
time.sleep(2)
turtle.goto(180,180)
turtle.showturtle()
turtle.write(me,font=(20,),align="center",move=True)
window = turtle.Screen()
window.exitonclick()


Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.

扫一扫,分享到微信

微信分享二维码
  • Copyrights © 2015-2023 dwx
  • Visitors: | Views:

请我喝杯咖啡吧~

支付宝
微信