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 trialtraolach trewhella
Courses Plus Student 835 Pointscan somone break this down for me. i seem to be missing the point
do i put the braces in the string im trying my best with this(:
name = "trey"
subject = "treehouse loves {},format()"
3 Answers
Nathan Tallack
22,160 PointsYou were close. We are moving the .format outside of the quotes and we are popping the name variable as the parameter for the .format so that it puts that into the place of the {}'s.
Note also that the string starts with a capital 'T' for Treehouse rather than the lowercase you used. The workspace check cares about case inside of strings so take care to match what the instructions require.
name = "trey"
subject = "Treehouse loves {}".format(name)
traolach trewhella
Courses Plus Student 835 Pointsstill did not work ?
Nathan Tallack
22,160 PointsWorks for me. Maybe reload the page in your browser. Sometimes your cache breaks the workspace challenges.
Thomas Katalenas
11,033 Pointscant you also do
subject = "Treehouse loves swift \(name)"
Nathan Tallack
22,160 PointsYou could syntatically. But you should take care to do it the way they say in the challenge. They specifically ask for you to use .format, so they may be looking for you using that format.