Python⽤最简单的代码画出⼀箭穿⼼import turtle
def curvemove(): # 定义画圆的函数
for i in range(100):
turtle.right(2)
turtle.forward(2)
turtle.speed(8)
turtle.pensize(3)
# turtle.hideturtle() # 隐藏画笔的形状
turtle.speed(5)
turtle.begin_fill() # 开始填充
# 左侧
turtle.left(140)
turtle.forward(111.65)
curvemove()
# 右侧
turtle.left(120)
curvemove()
turtle.forward(111.65)
# 第⼆个爱⼼
turtle.begin_fill()
turtle.penup()
<(60,0)
turtle.pendown()
turtle.right(80)
turtle.forward(111.65)
curvemove()
turtle.left(120)
curvemove()
turtle.forward(111.65)
# 画箭
turtle.begin_fill()
turtle.hideturtle()
turtle.penup()
<(-150, 20)
turtle.pendown()
turtle.pensize(5)
turtle.right(80)
turtle.forward(15)
turtle.right(120)
turtle.forward(40)
turtle.right(60)
turtle.forward(14)
turtle.left(60)
turtle.forward(375)
turtle.left(90)
turtle.forward(10)
turtle.right(110)
turtle.right(110)
turtle.forward(30)
html代码转链接turtle.right(140)
turtle.forward(30)
turtle.right(110)
turtle.forward(10)
turtle.left(90)
turtle.forward(375)
turtle.left(60)
turtle.forward(14)
turtle.right(60)
turtle.forward(40)
turtle.right(120)
turtle.forward(15)
turtle.penup()
<(10.5,85)
turtle.write("L O V E",font=("⿊体",20,"normal")) turtle.done()
实现结果如下:

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。