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 trialBlake Rogers
3,069 PointsOK! Make a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name var
OK! Make a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variable.
help me solve this
2 Answers
Adam Bodie
34,341 PointsAfter setting name = "your name", you would create the the following line:
subject = "Treehouse loves " + name
Don't forget to add a space after loves, or else the name variable will be added to the string without it.
Robert Coll
1,254 PointsThis WAS NOT the correct answer according to them, but this brought up the correct answer in workspace
I tried this:
name = "bob" subject = "Treehouse loves " subject += name print(subject)
that should have worked for this problem but did not. The answer from Adam above will work for this question, not mine but I wanted to bring it up because it is right. Right??
Robert Coll
1,254 Pointslol and imagine if there are no syntax or alignment issues either. I typed it in right when I commented, not sure why the code ended up looking like that.