Day035.太阳花的绘制

Codes

'''
    太阳花的绘制。见下方图形,太阳花外接圆直接 200,顶角均为 30 度。
    @Ref 2017.Python语言程序设计基础.第2版.嵩天, p31
    @Version: v0.1, Python 3.9.5, Notus(hehe_xiao@qq.com), 2021.05.30
    @Updated: 2021.05.30
'''

from turtle import *

color('red', 'yellow')
begin_fill()
while True:
    forward(200)
    right(170)
    if abs(pos()) < 1:
        break
end_fill()
done()

Outputs

原文地址:https://www.cnblogs.com/leo1875/p/14827156.html