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

I'm confused on this one

Use the favorite_color variable with your print statement to output the following message to the screen :

The color [USER INPUTTED COLOR] is a great color!

(I will enter my favorite color when I run the test)

what am i doing wrong?

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

3 Answers

snehil verma
snehil verma
2,821 Points

Please tell me what the last line will be I am confused.

Craig Dennis
Craig Dennis
Treehouse Teacher

Hi snehil verma !

I think you'll find more help if you make a new question with your code, instead of on this question.

I'll help you there, once I understand where your struggle is!

Thanks!

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Don't worry about setting favorite_color, I will set that when I run script. I'll provide my favorite color, so your first line is great.

In your last line, you have created a single string, as opposed to passing in multiple options. Is that what you intended?

Let me know if that hint doesn't do it ;) You are close!

Thanks. I figured it out shortly after posting

Samson Akinkunmi
Samson Akinkunmi
70 Points

How did you answer the question because Iā€™m still struggling with this