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 trialDaniel Gold
961 PointsHaving 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 = "daniel"
n1 = "Tree"
n2 = "house"
treehouse = n1 + n2
email_greeting("{} loves {}".format(treehouse, name))
Dan Johnson
40,533 PointsThe 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
40,533 PointsThe 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
Treehouse Guest TeacherThe 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
961 PointsThanks 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
Treehouse Guest TeacherYou 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
961 PointsI get it now. Thanks.
Shadow Skillz
3,020 PointsShadow Skillz
3,020 PointsI 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