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 trialJasmin Mattiaccio
Courses Plus Student 3,131 Pointshello, pretty sure i've done this correctly yet it wont let me pass :(
Dont know why it is marking my code as wrong.... unless it is wrong??
name = 'Jasmin'
subject = "Treehouse loves {}" .format(name)
Steven Parker
231,236 PointsThe instructions explicitly say: "You do not need to print()
anything."
2 Answers
Steven Parker
231,236 PointsReadability aside, the space between the template string and the ".format" is allowed by the language syntax, but the challenge doesn't accept it.
You might want to report this as a bug to the Support staff.
Jasmin Mattiaccio
Courses Plus Student 3,131 PointsIt worked! Thank-you :)
dublinruncommutr
5,944 Pointsdublinruncommutr
5,944 PointsHi Jasmin - take a look at your last line of code - it appears you have some white space between the string you are trying to format and the method call to .format() you are trying to make - syntactically this will work but less readable.
This exercise requires a print output to pass. Reexamine your code and I'm sure you'll see where you might be able to print() your formatted string.