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 trialB.B Eight
725 PointsI tried my code on the workspace and it worked fine, but the same code placed here gets me a error
my code name = "bob" subject = "Treehouse loves {} " print(subject.format(name))
error message asks me to try and use {} and .format()
- which I am already using and
- this code works fine in the workspace
name = "Ajay"
subject = "Treehouse loves {}"
print(subject.format(name))
1 Answer
Steven Parker
231,269 PointsRemember that "works fine" does not always mean "does the correct thing".
Your program may print just what you expect, but the challenge did not ask for anything to be printed.
See these hints I gave to someone who did nearly the exact same thing just a few minutes ago.
B.B Eight
725 PointsB.B Eight
725 Pointsthat worked! thank you