1 Star 2 Fork 2

刘彬彬/小知识_自动化任务脚本_DhanushNehru

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rainbow_triangle.py 430 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aashit Agrawal 提交于 2年前 . folder name change
# python code to draw rainbow triangle using turtle
import turtle
# colors to be used in hexagon
colors = ("red", "yellow", "cyan", "green")
t = turtle.Turtle()
# creating tutle GUI screen
screen = turtle.Screen()
screen.bgcolor("black")
# setting the speed of the turtle
t.speed(10)
c = 0
for i in range(100):
t.forward(i*10)
t.right(114)
t.color(colors[c])
if c == 3:
c = 0
else:
c += 1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/liu_binbin/some_python_scripts.git
git@gitee.com:liu_binbin/some_python_scripts.git
liu_binbin
some_python_scripts
小知识_自动化任务脚本_DhanushNehru
master

搜索帮助