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 trial

Python Python Basics (Retired) Ins & Outs Ins & Outs

Adedara Olanrewaju
Adedara Olanrewaju
398 Points

python 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.py
name = "lanre"
treehouse = "Tree"+"house"

email_greeting = " X = treehouse " + " loves " + " Y = name "
Ryne Smith
Ryne Smith
1,297 Points

Hello 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.

5 Answers

Ryne Smith
Ryne Smith
1,297 Points

You have an odd number of quotation marks. You are missing one.

Ryne Smith
Ryne Smith
1,297 Points

The 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
Adedara Olanrewaju
398 Points

name = "lanre" treehouse = "Tree" + "house" email_greeting = treehouse + " loves " + names

...That's what i did and its still not working

Adedara Olanrewaju
Adedara Olanrewaju
398 Points

name = "Adedara" treehouse = "Tree" + "house email_greeting = treehouse +" loves "+ name ..It still ain't working

Adedara Olanrewaju
Adedara Olanrewaju
398 Points

Thanks it's all working fine now....

Ryne Smith
Ryne Smith
1,297 Points

No problem. Keep up the good work. : )