Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python

Mohammad Fahad Shaikh
Mohammad Fahad Shaikh
5,783 Points

Python 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

Hi 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!

Mohammad Fahad Shaikh
Mohammad Fahad Shaikh
5,783 Points

Thank you very much. It worked perfectly.

Can you please try to explain the second line of code ?

Hello 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!