1、运行turtle库时使用red参数出现问题
NameError: name 'red' is not defined
原因,错误使用,没有添加引号:
turtle.color(red)
正确使用为:turtle.color('red')
2、turtle.color(r,g,b)调用出错
turtle.TurtleGraphicsError: bad color sequence: (100, 100, 100)
错误代码为:
turtle.color(100, 100, 100)
正确使用为:turtle.color(0.5,1,1),因为这里的r,g,b的参数代表的是百分比,使用超过1的会出现参数报错