利用python turtle库绘制了一个爱心
话不多说,直接上代码:
from turtle import *
def curvemove():
for i in range(200):
color('red','pink')
right(1)
forward(1)
begin_fill()
color('red','pink')
left(140)
forward(111.65)
curvemove()
left(120)
curvemove()
forward(111.65)
end_fill()
done()
效果图:
喜欢的话,快拿去和你心爱的人表白吧!