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

I'm stuck on this: email_greeting = (" Treehouse loves name ")

I've tried every variation i can think of, I just don't know what I'm doing wrong and there's no hints or anything.

name.py
name = "Mary"
treehouse = "Tree" + "house"
email_greeting = (" Treehouse  loves  name ")

2 Answers

Jeremy Fisk
Jeremy Fisk
7,768 Points

Mary-Frances,

Consider inserting your variable names in email_greeting and do not enclose those variable names in quotes:

so, instead of email_greeting ="Treehouse loves name" you might have email_greeting = variable + "loves " + variable

Hi Jeremy, Thank you for your response. So I tried every variation I could think of before I emailed you yesterday. Including the one you suggested: email_greeting = treehouse + "loves " + name

I put that in again this morning and still get the bummer it's not right message.

Would you mind just telling me what the correct syntax is? So I can figure out exactly what I'm doing wrong. Thanks

Jeremy Fisk
Jeremy Fisk
7,768 Points

yes ma'am, it appears that a space is necessary before and after the " loves ", so the correct syntax would be:

email_greeting = treehouse + " loves " + name

Jeremy Fisk
Jeremy Fisk
7,768 Points

also, i would recommend installing Python 3.4 on your computer, it makes it easier to test your code and observe the output or errors, and then you can cut and paste your script into the treehouse workspace, the treehouse error messages are not always that easy to interpret where you are going wrong