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

SandraLee Rowe
SandraLee Rowe
3,637 Points

I've tried all the possible solutions that came to mind, but I'm still unsure where I might be making a mistake.

using_input.py
favorite_color=input ('purple')
purple=input ('The color purple is a great color!')

2 Answers

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Data Analysis Techdegree Graduate 49,304 Points

Hey SandraLee Rowe ! :wave:

So for the first part of the challenge it's asking us to prompt the user "What is your favorite color? " and save their response to a favorite_color variable.

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

For the second part of the challenge, it needs to be dynamic so that no matter what color the user inputs, it will be added into the string. It also mentions we need to print the message so we don't need another variable here. We'll need to close the strings and use commas to separate the values like in the previous videos.

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

I hope this makes sense! :smiley:

SandraLee Rowe
SandraLee Rowe
3,637 Points

Awesome thank you for helping me.