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.

Python Python Basics Meet Python Using Input

Carlos Martin
Carlos Martin
Courses Plus Student 2,383 Points



I am getting this error message with my code.

Can anyone help?


favorite_color = input("What is your favorite color? ") 
print("the color", favorite_color , " a great color!") 
Aldo Rivadeneira
Aldo Rivadeneira
3,241 Points

Hey there!, may be you need to format your code in a different way

Remember this things {}, i hope this helps ;)

Ps BTW , i try your code and it works maybe the challenge needs to be in the way that was im talking ;)

1 Answer

Alex Koumparos
Alex Koumparos
Python Development Techdegree Student 36,862 Points

Hi Carlos,

The question requires that your output string be of the form "The color [USER INPUTTED COLOR] is a great color!"

Your code produces the following: "The color [USER INPUTTED COLOR] a great color!"

Note that there are two spaces between the end of the color name and the word "a". Note also that you are missing the word "is".