Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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. : )