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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Chai Thang](https://uploads.teamtreehouse.com/production/profile-photos/11595507/micro_102659691_2669602623317638_6802991513570739121_o.jpg)
Chai Thang
194 Pointshow do you write this code?
favorite_color = input("What is your favorite color? ")
1 Answer
![Peter Vann](https://uploads.teamtreehouse.com/production/profile-photos/8935412/micro_MaiTaiPeteGravatar.jpg)
Peter Vann
36,426 PointsHi Chai!
Looks like you have task 1 done OK.
There are two ways to handle task 2, like this:
# Task 1
favorite_color = input("What is your favorite color? ")
# Task 2
print( "The color {} is a great color!".format(favorite_color) )
# Or this (2nd way to handle Task 2):
# print( f"the color {favorite_color} is a great color!" )
More info:
https://realpython.com/python-formatted-output/
I hope that helps.
Stay safe and happy coding!