Closed donkirkby closed 2 years ago
Used an unknown colour name in turtle graphics.
import turtle as t t.pensize(5) t.color('red') t.forward(50) t.right(90) t.color('brightyellow') t.forward(100)
It ignored the "brightyellow" colour, and continued drawing. The vertical line was black in PyCharm, and red in the browser.
Raise an error, like when I run the code in regular Python:
turtle.TurtleGraphicsError: bad color string: brightyellow
Describe the versions of everything you were using:
What I did
Used an unknown colour name in turtle graphics.
What happened
It ignored the "brightyellow" colour, and continued drawing. The vertical line was black in PyCharm, and red in the browser.
What I wanted to happen
Raise an error, like when I run the code in regular Python:
My environment
Describe the versions of everything you were using: