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

What im doing wrong?

I tried this and says is not correct. Also I tried:

email_greeting = name + " loves " + treehouse

And is wrong again.

name.py
name = "javi"
treehouse = "Tree" + "house"

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

2 Answers

Herb Bresnan
Herb Bresnan
10,658 Points

I think they are looking for the phrase "Treehouse loves Javi". In .format try placing treehouse first, and name second.

Darren Joy
Darren Joy
19,573 Points

I went back and redid and can confirm it's just the order you have them in. I did it with how you did it names + love + treehouse but reverse:

from the notes": "... "X loves Y" but with treehouse for X and name for Y.

Thank you both. Sometimes I feel veeery veeery stupid. :D

Darren Joy
Darren Joy
19,573 Points

It never hurts to ask. I was coding something recently for a coursera course and because it was xtity x lines of code I missed a half dozen semi colons. I also often put brackets around wrong junk in jquery and pull my hair out trying to figure out what I did wrong!

Just like in writing class way back in highschool... it's WAY easier to have a second pair of eyes look at something when editing.. sometimes we're just too deep into the weeds to see the swamp... or sumptin

Herb Bresnan
Herb Bresnan
10,658 Points

I am relatively new to programming and do the same thing. Glad to know someone with more experience does the same thing. Not that I'm glad you were pulling your hair out (Darren), but you get the idea.