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 trialNisha Midha
1,925 PointsI need help with the challenge task 2 of 2
please help me code second task
name = "Hey, all practice is good practice, right?"
subject = "Treehouse loves" .format(+ name)"
2 Answers
jacksonpranica
17,610 PointsHey Nisha,
First off, you need to include a {} inside your subject variable string just like task 2 tells you. It should say, "Treehouse loves {}". That is because the {} acts as a placeholder for the variable you will insert using the format.
Secondly, the .format() only needs name inside of it. So it needs .format(name). The '+ name' is not correct.
Take those hints and go finish that challenge! :]
Nisha Midha
1,925 PointsI tried that already and it didn't work. I coded second task as subject = "Treehouse loves{}" Then how do I code the second part to show the format? .format(name)
prateek parasher
806 Pointsi think this should work name = "Deja vu" subject += "Treehouse loves {}" .format(name) print (subject) but in work space it showing error " It looks like Task 1 is no longer passing."