爱她就用python给她画个小心心 ♥(ˆ◡ˆԅ)
from turtle import * a = Turtle() screensize(400, 300, "blue") setup(width=1300, height=650, startx=20, starty=20) a.speed(10) a.hideturtle() a.pensize(2) a.color('red', 'pink') a.up() a.goto(200, 0) a.down() a.left(150) a.begin_fill() a.speed(1) a.forward(51) a.speed(50) for i in range(150): a.forward(1) a.right(0.3) a.speed(50) for i in range(210): a.forward(1) a.right(0.786) a.left(120) a.speed(50) for i in range(210): a.forward(1) a.right(0.786) a.speed(50) for i in range(150): a.forward(1) a.right(0.3) a.speed(1) a.forward(51) a.end_fill() # 画笔朝向x轴正方向 a.setheading(0) a.up() a.goto(-80, -100) a.down() a.left(150) a.begin_fill() a.speed(1) a.forward(51 * 1.5) a.speed(50) for i in range(150): a.forward(1.5) a.right(0.3) a.speed(50) for i in range(210): a.forward(1.5) a.right(0.786) a.left(120) a.speed(50) for i in range(210): a.forward(1.5) a.right(0.786) a.speed(50) for i in range(150): a.forward(1.5) a.right(0.3) a.speed(1) a.forward(51 * 1.5) a.end_fill() # 画穿心直线 a.pensize(7) a.setheading(0) a.up() a.goto(-400, 0) a.down() a.left(15) a.forward(150) a.up() a.goto(339, 175) a.down() # 画箭头 a.forward(150) a.pensize(1) a.speed(5) a.color('red', 'red') a.begin_fill() a.left(120) a.forward(20) a.right(150) a.forward(35) a.right(120) a.forward(35) a.right(150) a.forward(20) a.end_fill() a.up() a.goto(400, -300) a.down() a.write('作者:爱苗苗的凡哥', move = True, align = 'left', font = ('楷体', 20, 'normal')) done()