Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Christopher Gomez
Courses Plus Student 13,800 PointsNot sure what I'm doing wrong
Bummer: : Hmm...I answered the prompt with 'Red' but that's not what was in the variable favorite_color
I keep getting this error and I redid the challenge before this one but still get the same error message
favorite_color = input("What is your favorite color? ")
favorite_color = "purple"
print("The color", favorite_color, "is a great color!")
4 Answers

Paisley Myers
209 PointsI think it will work if you take out the second line. You are defining favorite_color twice.

Christopher Gomez
Courses Plus Student 13,800 Points
Craig Dennis
Treehouse TeacherYeah don't re-define the color to purple...I call your script and fill in the prompt...that sets favorite_color
to what I entered.
That make sense?

Christian Berglönn
3,274 PointsAs Paisley says, you're already letting the user define favorite_color with your input statement. By defining favorite_color again with "purple" probably just messes it up. Try removing favorite_color = "purple" and it probably will work.
Cheers

Christopher Gomez
Courses Plus Student 13,800 Pointsprops to Paisley Myers figured it out the red confused me because I put red for the other challenge before this one thanks guys
Christopher Gomez
Courses Plus Student 13,800 PointsChristopher Gomez
Courses Plus Student 13,800 Points@Craig Dennis