七夕来袭!是时候展现专属于程序员的浪漫了!你打算怎么给心爱的人表达爱意?鲜花礼物?代码表白?还是创意DIY?或者…无论那种形式,快来秀我们一脸吧!
目录
创意代码表白
以程序员的方式撒狗粮,专业浪漫,值得拥有!
运行效果:
代码:
import turtle
def curvemove():
for i in range(200):
turtle.right(1)
turtle.forward(1)turtle.color('blue')
turtle.begin_fill()
turtle.left(140)
turtle.forward(111.65)
curvemove()
turtle.left(120)
curvemove()
turtle.forward(111.65)
turtle.end_fill()turtle.penup()
turtle.goto(-40, -50)
turtle.pendown()
turtle.write('I LOVE YOU', font = ('SimHei', 15, 'bold'))
turtle.hideturtle()
x = input()
import turtle
def curvemove():
for i in range(200):
turtle.right(1)
turtle.forward(1)
turtle.color('blue')
turtle.begin_fill()
turtle.left(140)
turtle.forward(111.65)
curvemove()
turtle.left(120)
curvemove()
turtle.forward(111.65)
turtle.end_fill()
turtle.penup()
turtle.goto(-40, -50)
turtle.pendown()
turtle.write('I LOVE YOU', font = ('SimHei', 15, 'bold'))
turtle.hideturtle()
x = input()