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

Daniel Gold
Daniel Gold
961 Points

Having a weird problem with this challenge. I get to stage 3 and it says my stage one is wrong.

I go back and change nothing in stage one and it accepts it again. Go back to stage 3. rejects again. Please help.

name.py
name = "daniel"
n1 = "Tree"
n2 = "house"
treehouse = n1 + n2
email_greeting("{} loves {}".format(treehouse, name))
Shadow Skillz
Shadow Skillz
3,020 Points

I also had the same issue trying it both ways

name = ('jack') n = ('Tree') x = ('Hose') treehouse = (n + x) or treehouse = ('{}{}'.format(n,x))

and it still says its wrong

Dan Johnson
Dan Johnson
40,533 Points

The extra variables might be throwing it off. You can just do this:

treehouse = "Tree" + "house"

Then do the same for email_greeting (using the + operator still).

3 Answers

Dan Johnson
Dan Johnson
40,533 Points

The challenge wants you to use the + operator for concatenation instead of format. Also email_greeting is a variable you want to set to the result, not a function.

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

The n1 + n2 is fine (not exactly what I wanted, but fine). The only mistake in your code is that you didn't use an = on the email_greeting line.

Daniel Gold
Daniel Gold
961 Points

Thanks Ken,

So it should have been like this ?

email_greeting = ("{} loves {}".format(treehouse, name))

What would you have wanted instead of n1 + n2

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

You don't need that outside set of parentheses.

And my goal was to get you to do treehouse = "Tree" + "house". You've done that, just indirectly.

Daniel Gold
Daniel Gold
961 Points

I get it now. Thanks.