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 trialNorah Altamimi
882 PointsWhat am I doing wrong
input(favorite_color)
print('What is your favorite color?'), ('favorite_color')
1 Answer
Coleton Gorecke
3,936 PointsHello! You are super close however one way to write this would be like this:
favorite_color = input('What is your favorite color? ') # User inputs blue
print("You're favorite color is {}. ").format(favorite_color)
# Console would show : "You're favorite color is blue."
Input asks the user for a response and usually (but not always) stores that response as a variable. print() just prints out whatever you want the user to see. For example if you wanted it to just print out the user's response you would say:
favorite_color = input('What is your favorite color? ') # User inputs blue
print(favorite_color)
# Console would show : 'blue'
Brandon White
Full Stack JavaScript Techdegree Graduate 35,771 PointsBrandon White
Full Stack JavaScript Techdegree Graduate 35,771 PointsHi Norah,
You're really close, but the syntax for printing formatted text is this...
Hope that helps.