Python Python Basics Meet Python Using Input

Patrick Fay
Patrick Fay
116 Points

where did the input the color Mauve come from??

using_input.py
favorite_color=input("What is your favorite color?")
print( "What is your favorite color")
print("The color", "favorite_color",  "is a great color")

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 57,175 Points

The challenge checker applies various inputs to your code to see if it passes the challenge. In this case, It uses "Mauve" as the text string response to the input statement. It appears that Test 2 is checking that the color input matches what is in the printed text.

You code needs to remove the quote marks surrounding favorite_color. With quote marks it is just text and not the variable point to the inputed text.

Post back if you need more help. Good luck!!

Patrick Fay
Patrick Fay
116 Points

AWESOME !!

Thank you Chris!

<noob />
<noob />
16,622 Points

ur question isn’t clear what u struggle with the code ?

Chris Freeman
Chris Freeman
Treehouse Moderator 57,175 Points

Thanks for helping out on the forum. I believe he was asking about the challenge Test Results output seen with his given input.

As feedback, your response would be better as a comment under the original post rather than as an answer. Posting a comment as an answer make the post appear to have been answered and thus received less attention that it deserves as a yet unanswered question.