【Python】利用turtle库画一个爱心气球

直接上代码

from turtle import*
speed(0)
screensize(800,600)
pensize(1)
def curvemove():
    for i in range(200):
        right(1)
        forward(1)
color('red','red')
begin_fill()
left(120)
forward(111.65)
curvemove()
left(120)
curvemove()
forward(111.65)
end_fill()
for i in range(4):
    circle(40,80)
    circle(-40,80)
#clear()
done()

效果图
【Python】利用turtle库画一个爱心气球_第1张图片

你可能感兴趣的:(python)