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
Juan Antonio Mejia Vazquez
903 Points.format() challenge
I'm currently trying to pass this challenge but the webtool won't let me, I already made the code on the python shell succesfully
name = "Tony"
subject = "Treehouse loves {}"
print(subject.format(name))
Treehouse loves Tony
1 Answer
Jennifer Nordell
Treehouse TeacherHi Juan! I believe you're referring to this challenge. And you're very close here. In fact, your code should be functional. However, it's important to note that just because it's functional does not necessarily mean that it meets the specific requirements of the challenge.
It's important in these challenges to try not to do anything the challenge doesn't explicitly ask for. Even if it's functional, it can cause the challenge to fail. In this case, the challenge does not ask you to print anything.
Hint: The total code for the second step of the challenge should only be two lines long. Try using the format() method directly on the string required by the challenge and assign the entire thing to the variable
subject.
Hope this helps, but let me know if you're still stuck!
Juan Antonio Mejia Vazquez
903 PointsJuan Antonio Mejia Vazquez
903 PointsThanks Jennifer