如何用python的turtle海龟制图画一个不正经的爱心❤️

# coding=utf-8
import turtle
import time

def draw_circle():
    for i in range(400):
        turtle.right(0.5)
        turtle.forward(1)
def draw_love():
#    turtle.color('red','darkred')
#    turtle.pensize(1)
    turtle.pen(fillcolor="black",pencolor="red",pensize=8)
    turtle.speed(2000)
    turtle.goto(0,0)
    turtle.begin_fill()
    turtle.left(140)
    turtle.forward(224)
    draw_circle()
    turtle.left(120)
    draw_circle()
    turtle.forward(224)
    turtle.end_fill()
    turtle.write("I Love you")
    time.sleep(2)
    turtle.up()
    turtle.goto(150,20)
    turtle.color('black')
    turtle.write('相夕妄想 来日方长 很喜欢你 到此为止',font=("微软雅黑",18,"normal"))
    time.sleep(2)
def draw_abc():
    turtle.fillcolor("black")
    turtle.pencolor("red")
    turtle.pensize(10)
    turtle.speed(1)
    turtle.up()
    turtle.goto(0,-50)
    turtle.down()
    turtle.begin_fill()
    turtle.circle(45)
    turtle.end_fill()
    time.sleep(2)
def word():
    turtle.up()
    turtle.goto(-100,200)
    turtle.color("red")
    turtle.pensize(4)
#   turtle.down()
    turtle.write('宝贝,你以为你是唯一吗?',font=("隶书",18,"bold"))
    time.sleep(10)
draw_love()
draw_abc()
word()

附上沙雕成品图:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值