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 trialAlexandre Gagarochkine
426 PointsMake a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variab
Make a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variable. my answer : name = "Alex" subject = "Treehouse Loves " + name
But somethink wrong.I dont now why?
name = "Alex"
subject = "Treehouse loves " + name
6 Answers
Stuart Wright
41,120 PointsThe challenges can be picky. It doesn't like your double space between Treehouse and loves.
Alexandre Gagarochkine
426 Pointsi was try to many times not work
Steven Parker
231,269 PointsJust to be sure...
Here's the same thing you wrote yourself, but this time properly quoted to make sure Markdown isn't concealing something funny:
name = "Alex"
subject = "Treehouse loves " + name
I can assure you that it passes the challenge.
Alexandre Gagarochkine
426 PointsYes i did.Thanks.But coding was same i was writing what happen? pls explane me Thanks
Steven Parker
231,269 PointsIt looked the same to me also, but perhaps there was some funny character in there that Markdown was not showing. Otherwise, I have no idea!
Alexandre Gagarochkine
426 Pointsthanks for your responce
Alexandre Gagarochkine
426 Pointsformat() on the string "Treehouse loves {}" to put your name into the placeholder. Assign this to the variable subject (so start with subject =). my answer:
name = "Alex" subject = "treehouse loves {}" .format (name)
But nt working Sombody have ideya why? Thanks
Steven Parker
231,269 PointsThis challenge is specifically about concatenation (using the "+" sign). What you've done here would be functionally equivalent in practice, but it's not what the instructions asked for here and won't pass the challenge.
I'm still suspecting that odd character codes are involved. Did you try cut-and-paste directly from the box in my first answer ?
Alexandre Gagarochkine
426 PointsAlexandre Gagarochkine
426 Pointsname = "Alex"
subject = "Treehouse loves " + name
I did but still same result
Steven Parker
231,269 PointsSteven Parker
231,269 PointsOdd, if I paste that into the challenge it passes.