对于python,turtle模块大家应该不陌生
今天用这个画一个爱心,玩一下
最终的成果是这样子滴:
代码如下啦:
-- coding: utf-8 --
from turtle import *
def curvemove():
for i in range(200):
right(1)
forward(1)
color(‘red’,‘pink’)
begin_fill()
left(140)
forward(111.65)
curvemove()
left(120)
curvemove()
forward(111.65)
end_fill()
done()
就到这里啦 over~
————————————————
版权声明:本文为CSDN博主「JiawenZhang97」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/pary__for/article/details/86629375