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

Justin Slade
Justin Slade
603 Points

The variable "Treehouse" does not pass.

I keep trying and trying this task again and again in different ways but it just does not pass me.

The instruction is to create a variable named "Treehouse" combining the two strings "tree" and "house".

I did this using this code:

Treehouse = "tree" + "house"

The instruction was also to keep task 1's code.

Which I added the treehouse variable to the bottom of task 1's code.

name = "Shelley"

if name == "Shelley": print(name + " She is a lumberjack and is okay! ") else: print(name + " sleeps all night and " + name + " and works all day!")

Treehouse = "tree" + "house"

The error message is: Bummer! You didn't create the treehouse variable!

Where am I going wrong?

name.py
name = "Shelley"

if name == "Shelley":
  print(name + " She is a lumberjack and is okay! ")
else:
  print(name + " sleeps all night and " + name + " and works all day!")

Treehouse = "tree" + "house"
Justin Slade
Justin Slade
603 Points

Got it!

It is case sensitive

treehouse = "Tree" + "house"

This is correct

Glen Winters
Glen Winters
3,011 Points

In Python, the convention is to use all lowercase for variables. Class names have the first letter capitalizer (e.g. Treehouse), and constants are in all caps (TREEHOUSE).

1 Answer

=) who received the best answer?