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 trialMohammad Fahad Shaikh
5,783 PointsPython Basics final quiz
How to solve the final quiz in the python basics section ? the print color mauve thing keeps getting error no matter what I do.
2 Answers
Shem Ogweno
15,393 PointsHi Mohammad,
Hope this is what you are looking for!
favorite_color = input("What is your favorite color? ")
print("The color {} is a great color!".format(favorite_color))
Hope this help!
Shem Ogweno
15,393 PointsHello Mohammad,
The second line is using a placeholder {} that will be replace with what we enter in the format
You will learn about it soon!
Mohammad Fahad Shaikh
5,783 PointsThanks a lot.
Mohammad Fahad Shaikh
5,783 PointsMohammad Fahad Shaikh
5,783 PointsThank you very much. It worked perfectly.
Can you please try to explain the second line of code ?