本篇文章记录Python学习过程中遇到的一些有趣的代码。
Sunflower drawing:
draw a Sunflower
Code:
from turtle import *
color('red','yellow')
begin_fill()
while True:
forward(200)
left(170)
if abs(pos()) < 1:
break
end_fill()
done()
Output:
FIG as the final output.