使用python 520表白吧

在即将到来的520情人节,博主利用Python编写了一段代码,绘制出一束精美的玫瑰花,以此作为特别的表白礼物。代码部分借鉴网络资源,最终展示的效果极具创意。
摘要由CSDN通过智能技术生成

明天就是520了,使用python画一束玫瑰送给妹子。部分代码来自网络。

代码如下:

import turtle

turtle.penup()
turtle.left(90)
turtle.fd(200)
turtle.pendown()
turtle.right(90)



#文字

printer = turtle.Turtle()
printer.hideturtle()
printer.penup()
printer.back(200)
printer.write("Baby 520 happy!\n\n", align="right", font=("楷体", 16, "bold"))
printer.write("           from M.Zhao", align="center", font=("楷体", 12, "normal"))

turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(10,180)
turtle.circle(25,110)
turtle.left(50)
turtle.circle(60,45)
turtle.circle(20,170)
turtle.right(24)
turtle.fd(30)
turtle.left(10)
turtle.circle(30,110)
turtle.fd(20)
turtle.left(40)
turtle.circle(90,70)
turtle.circle(30,150)
turtle.right(30)
turtle.fd(15)
turtle.circle(80,90)
turtle.left(15)
turtle.fd(45)
turtle.right(165)
turtle.fd(20)
turtle.left(155)
turtle.circle(150,80)
t
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值