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 trialJoseph Ferrero
1,308 PointsCode Challenge Bug
Hello,
They are asking me to create a variable that equals my name, OK:
name = "joseph"
Then they want me to create another variable that says "Treehouse Loves {}", and then using .format(), inject the name variable. OK:
subject = "Treehouse Loves {}".format(name)
I know this is correct, but it keeps telling me that I got it wrong.
name = "joseph"
subject = "Treehouse Loves {}".format(name)
4 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHi Joseph,
Yes, your code is correct in syntax, but challenges are very picky and specific with what it checks for. Here, it's simply just a typo. You capitalized the "L" in loves, when it should be lower cased.
Fix that up and all's good! :)
Keep Coding!
Alexandra Barnett
Front End Web Development Techdegree Graduate 46,473 PointsHi Joseph!
Very close! You capitalised the word 'loves' when it is lowercase:
name = "Alex"
subject = "Treehouse loves {}".format(name)
andren
28,558 PointsYour code is correct but these challenges are extremely picky about how you write your strings, the string usually has to match the one they are looking for exactly, any difference no matter how minor tends to throw the challenge checker off.
In this case the issue is that you have capitalized the L in the word loves
. If you write in in lower case like this:
name = "joseph"
subject = "Treehouse loves {}".format(name)
Then your code will pass.
Joseph Ferrero
1,308 PointsOh gosh that is rather picky, frustrated I didn't catch that.
Thanks so much.
Regards, Joseph