Python turtle_彩花图案一
3月 21, 2021
0 Comments

这个程序需要coloradd模块支持。安装方法:按win键 + r键,打开运行对话框,输入cmd。然后在弹出的管理员窗口输入pip install coloradd即可安装。以下是所有代码。
import turtle from coloradd import coloradd turtle.speed(0) turtle.pensize(10) turtle.colormode(255) turtle.bgcolor('black') c = (255,0,0) turtle.color('red') for _ in range(8): for _ in range(4): c = coloradd(c,0.1) turtle.color(c) turtle.circle(90,90) turtle.right(180) turtle.rt(45) turtle.done()标签:python turtle circle example, python turtle circle 示例, python漂亮图案花