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 trialAdedara Olanrewaju
398 Pointspython basics
Finally, create a new variable named email_greeting that puts the treehouse variable and the name variable into the sentence "X loves Y" but with treehouse for X and name for Y. Don't forget your spacing!
name = "lanre"
treehouse = "Tree"+"house"
email_greeting = " X = treehouse " + " loves " + " Y = name "
5 Answers
Ryne Smith
1,297 PointsYou have an odd number of quotation marks. You are missing one.
Ryne Smith
1,297 PointsThe two issues that I see above (if your code is the same as the text in your reply) is that you need to include spaces between loves and the quotation marks in order to separate the words. The second issue is that your second variable says "names" instead of "name".
Adedara Olanrewaju
398 Pointsname = "lanre" treehouse = "Tree" + "house" email_greeting = treehouse + " loves " + names
...That's what i did and its still not working
Adedara Olanrewaju
398 Pointsname = "Adedara" treehouse = "Tree" + "house email_greeting = treehouse +" loves "+ name ..It still ain't working
Adedara Olanrewaju
398 PointsThanks it's all working fine now....
Ryne Smith
1,297 PointsNo problem. Keep up the good work. : )
Ryne Smith
1,297 PointsRyne Smith
1,297 PointsHello Adedara. For the email_greeting variable to equal the correct concatenated string, you only need to fill in the places where x and y are in the challenge. In other words on the left side of " loves ", you name the variable that you used for the string "Treehouse", and on the right side you need to use the variable that you used to store your name.
And remember, you do not use quotes when referring to a variable.