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 trialfred murrell
241 PointsUse the favorite_color variable in your print function to output the following message to the screen :
favrite = input("what is your favorite_color")
favorite_color = input("what is your favorite color?")
print("the color purple is a great color")
favorite_color = "purple"
1 Answer
Steven Parker
231,275 PointsYour second line was good for task 1, that's the only "input" you'll need and you won't need to create a "favorite" variable. So you can delete the top line.
For task 2, "purple" is only an example, the code shouldn't use it. Instead, print the phrase using "format" to substitute the user's color (you won't know what it is) into the message. You'll use a placeholder {} where the color will go, and pass the variable from task 1 to the "format" call.