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

Python Python Basics (2015) Python Data Types String Formatting

manuel verduzco
manuel verduzco
1,333 Points

what is wrong with this?

subject="treehouse loves {}" name="manuel" print(subject.format(name))

it seems to work in the work space but not on the quiz on the website i passed it once decided to do it again to make sure i understood completely but cant pass it again

strings.py
subject="treehouse loves {}"
name="manuel"
print(subject.format(name))

1 Answer

Michael Hulet
Michael Hulet
47,913 Points

You're pretty close, but the challenge just wants you to assign the whole finished string to the subject variable, instead of printing it out. Also, make sure you capitalize the "T" in "Treehouse"! This should work:

name = "Manuel"
subject = "Treehouse loves {}".format(name)