
# -*- codeing = utf-8 -*-
# @Time : 2022/3/22 22:47
# @Author : ning
# @File : 多边形太阳花.py
# @software : PyCharm
import turtle
import time
# 同时设置pencolor=color1, fillcolor=color2
turtle.color("red", "yellow")
turtle.begin_fill()
for _ in range(60):
turtle.forward(205)
turtle.left(172)
turtle.end_fill()
turtle.mainloop()
本文介绍了一个使用Python的Turtle模块绘制多边形太阳花的简单程序。通过设置颜色和填充,结合循环语句实现了动态绘制的效果。
933

被折叠的 条评论
为什么被折叠?



