In my python program I am reading from a file and storing the contents in a list. I checked each index of the list so I know it was stored correctly.
I am then passing a specific index to a class which contains the color blue.
Whenever it gets to the turtle.colorI get an error bad color string: "blue"
For example:
Team = Rainbow(str(sequence[0]),str(sequence[1]), str(sequence[2])) //index 2 (str(sequence[2])) contains "blue"
The I have a class
class Rainbow:
def __init__(self, Rname, Rteam, Rcolor):
self.name = Rname
self.team = Rteam
self.color = Rcolor
self.Rturtle = turtle.Turtle()
self.Rturtle.color(self.color)//here is where I get the error
I made sure everything is imported correctly and did some research on the this error and only got issues with bad sequence. Also, if I pass Team = Rainbow("Jay","Blue Jays","blue")I do not get the error.
I was wondering if someone would be able to help