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

LINKING TWO VARIABLES IN A SENTENCE

I am facing a challenge in how to link previously defined variables into a sentence. I have tried several changes but failed to pass the last challenge.

name.py
name = "Taurayi"
treehouse = "Tree" + "house"
email_greeting = treehouse + "loves" + name

The first two tasks l have passed them but the last task where l am supposed to link the two previous variables in a sentence that is where l am facing a challenge.

3 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Taurayi;

Welcome to Treehouse!

You are very close. Right now your output is "TreehouselovesTaurayi". You need to add a space before and after "loves" in your code.

Happy coding,

Ken

Drew Bissonnette
Drew Bissonnette
309 Points

Hey Ken,

I am having this same issue, I have a space between treehouse and name but still come back with "try again." Any ideas?

name = "Drew"

treehouse = "Tree" + "house"

email_greeting = treehouse + "loves" + name

if name == "Drew":

print("{} is cool! ".format(name))

else:

print("{} Treehouse ".format(treehouse))

Write your code as follows :

name = drew treehouse = " Tree + house " email_greeting = Drew " loves " treehouse

Hi sorry you shld code as follows Drew

name "Drew" treehouse = "Tree" + "house" email_greeting = "Tree house loves Drew"