Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics Meet Python Using Input

input "favorite color"?

using_input.py

at least try solving it i know you can do it if not send me the code to fix it

heres a hint : use the variable to make it ask whats your favorite color (input is required )

1 Answer

Ryan McGuire
Ryan McGuire
3,758 Points

Reading the question, you can guess they want you to create a "variable" named favorite_color. In one line you can set this equal to what the person at the computer types using the "input" function. The variable name could be anything you want that isn't already used. Like "favColor" because it's shorter, but following their suggestion for these questions is best. The input function will display the message below in quotes and then save whatever the person types as the response. The code should look like this.

favorite_color=input("What is your favorite color?")