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 trialRashed Molawizadeh
185 PointsI can't get past this
OK! Make a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variable. You've probably received an email or two with this subject already!
name = ("Rashed")
subject = ("Treehouse loves" )
Treehouse loves + name
Raduica Sebastian
Courses Plus Student 1,356 Pointsname="Rashed" subject="Treehouse loves" result=name+subject
2 Answers
Manish Giri
16,266 PointsThis is wrong -
subject = ("Treehouse loves" )
Treehouse loves + name
- You first create the strings -
"Treehouse loves " + name
- Then you assign the whole thing to
subject
-subject = "Treehouse loves " + name
Unsubscribed User
17,003 PointsYou're almost there!
So what the challenge is asking you to do it, create a new variable and add together a string and another variable.
To fix your code you just need to remove the third line and use this for the second line:
subject = "Treehouse loves " + name
When you then call the variable, subject, you'll get the output: Treehouse loves ... replace ... with the name you put in the name variable
Hope this helps! Happy coding :)
Afloarei Andrei
5,163 PointsAfloarei Andrei
5,163 Points'''name = "Rashed" subject = "Treehouse loves " + name '''