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

Zhang Dong Zhi
Zhang Dong Zhi
982 Points

solution for input challenge task 2 of 2

i am stuck with the input challenge task 2 of 2 the first step is favorite_color = input("what is your favorite color? ") but i am stuck with the next step because it does not ask me what is your favorite color. someone please help

using_input.py
favorite_color = input("what is your favorite color?    ")

1 Answer

Hi Zhang,

In the first part of this challenge, you ask the user for their favorite color. That input is stored in the favorite_color variable, which means I can use that variable in a print statement like this:

print("The color", favorite_color, "is a great color!")

So if I answered that my favorite color is blue, this print statement would say: The color blue is a great color!

Hopefully, this answers your question!