发布时间:2019-09-18 07:23:02编辑:auto阅读(2551)
对于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~
上一篇: python列表相加的方法:两个list
下一篇: python 转换彩图为黑白图 ,去噪
51039
50433
41033
37899
32368
29261
28141
22982
22945
21272
1150°
1856°
1515°
1441°
1724°
1531°
2190°
3782°
3694°
2602°