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 trialkennethharris3
7,652 PointsI tried everything really not good not being able to find an answer.
i need help for this q
input("what is your favorite_color? ")
"favorite_color" = "x"
2 Answers
gsav
3,800 Pointssimple solution here.
You can't assign a string a value of a different string. What you need to do is assign a Variable the value of a string.
#instead of
"favorite_color" = "color"
#you want
favorite_color = "color"
Philip Schultz
11,437 PointsHello, I believe it is asking you to store the user input in a variable called favorite_color. You don't need to put quotations around your variables.
favorite_color = input("What is your favorite color? ")
This code will allow you to store the user's input inside of a variable. The next question will ask you to print a statement using the new information you gathered from the user. Like below.
print("The color ", favorite_color, "is a great color!")