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 trialLuke Walker
274 PointsUse the favorite_color variable in your print function to output the following message to the screen
I have no idea why this is not working or what I'm supposed to type. Why can't I type any more than this in the box??
input("What is your favorite color?")
favorite_color = "Mauve"
mauve = ("The color", favorite_color, "is a great color!")
Luke Walker
274 PointsIt keeps telling me to use Red and then use Mauve.... what the hell is going on???
2 Answers
Tabatha Trahan
21,422 PointsIf you assign the results of the input to a variable named favorite_color, and then print out the string using the variable, it should work:
favorite_color = input("What is your favorite color?")
print("The color " + favorite_color + " is a great color")
So you are just taking the input and storing it in favorite_color. Then you are printing a string and adding the variable.
Luke Walker
274 PointsThank you so much 🙏
Luke Walker
274 PointsLuke Walker
274 PointsI didn't ask it to include code, but it has, I couldn't type more than 2 sentences when I was trying to submit the question... Is this path bugging out or something? Because I did this question yesterday, fine. And now, nothing is working and it si doing a bunch of things I'd asked it not to.