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

Challenge ins-outs challenge task 3

Where am I going wrong? All the spaces seem to be in the right areas. Well I think so anyway.

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

3 Answers

C H
C H
6,587 Points

Think of the variable name as representing "Michelle" exactly, so the quotation marks are already a part of it.

name = "Michelle"
treehouse = "Tree" + "house"
#This will become "treehouse" as the two strings become one. So, "red" + "blue" would become "redblue"

email_greeting = treehouse + " loves " + name
#no quotes on variable names and the spaces need to be explicit to show, see the spaces around " loves " instead of "loves"
Logan R
Logan R
22,989 Points

You're very close! Instead of using literal strings, try using the variables you created above :)

Also, make sure you add spacing to " loves ".

name = "Michelle"
treehouse = "Tree" + "house"
email_greeting = (treehouse + " loves " + name)

Thanks guys. Who knew that python could be so difficult, right? Well for beginners anyway.