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
Lewis Hill
Courses Plus Student 211 Pointscan anyone answer this question? Now, create a variable named treehouse by combining two strings, "Tree" and "house".
this is a question set by treehouse
name = "Tree + house"
if name == "Tree + house":
print("{} is a lumberjack and he is ok".format(name))
else: print("{} sleeps all night and {} works all day".format(name,name))
1 Answer
Luke Glazebrook
13,564 PointsHi Lewis!
You will need to make sure that you have the '+' sign outside of the quotation marks. If it is within them then it will think that it is part of the string.
Using this information, try and figure out the solution!
Good luck.