发布时间:2019-08-17 09:32:45编辑:auto阅读(2818)
利用Python画心形图,真是好奇妙啊,代码分享下~
from turtle import *
pensize(1)
pencolor('red')
fillcolor('pink')
speed(5)
up()
goto(-30, 100)
down()
begin_fill()
left(90)
circle(120,180)
circle(360,70)
left(38)
circle(360,70)
circle(120,180)
end_fill()
up()
goto(-100,-100)
down()
画出后的结果如下:
上一篇: python - 字典
下一篇: python django 上传图片
54960
41754
36342
31772
26672
26365
24889
20495
16438
15855
2988°
2713°
2812°
2960°
2897°
3158°
3049°
2894°
2884°
2864°