Python Python Basics (2015) Python Data Types List Creation

Cheri Castro
Cheri Castro
226 Points

List issues for challenge

Ok, the earlier challenges, I got through them with no problems, now, I watch the videos and I'm not passing the videos. I read through the teachers notes and still no clues as to what I'm missing. So, the task is to make a list of five colors with a list name of colors. The error that comes back is that blue is not defined and so on (as you remove colors). So, I tried putting str in front of the brackets, nope didn't do the trick. The I tried placing quotations at the beginning and end of the colors list, within the brackets; this was a no go as well. In the video he strictly deals with integers in his lists. So, since now they are asking us to create a list with five colors are we supposed to type it differently?

lists.py
Colors=[blue, black, red, orange, yellow]

3 Answers

Steven Parker
Steven Parker
171,137 Points

Your colors are actually color names (strings) and so each one should be enclosed in quotes.

Also, the instructions said to make a variable named "colors" (with a lower-case "c"), but you wrote "Colors" (with a capital "C"). Since Python is case-sensitive, these identifiers reference two different things.

Cam Treschuk
Cam Treschuk
6,476 Points

You have put quotations surrounding each value. Also, you have to name your list colors instead of Colors. Hope this helps!

Cheri Castro
Cheri Castro
226 Points

Oh my goodness, I didn't even notice that I had done that, thank you, both of you! Gosh I suck at this.