Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics Meet Python Variables

Nathaniel Agbontaen
Nathaniel Agbontaen
277 Points

I tried to put my name and, that I am learning python, but it still showed "Hello, World." Please help me.

I tried to write "Hello, Nate" and "Nate is learning python", but it showed "Hello World" Please help me.

Can you add a snapshot? That way a mistake can be identified

3 Answers

Hi Nathaniel Agbontaen, What you have is correct. I have tried running your code and the outcome is same as what you expected.

print("Hello, Nate") 
print("Nate is learning python")

So, my guess is make sure you save the file before executing it!

I will assume you were printing the strings this way!

  print("Hello, World")
  print("Hello, Nate")
  print("Nate is learning python")
Nathaniel Agbontaen
Nathaniel Agbontaen
277 Points

So what I did instead was this:

print("Hello, Nate") print("Nate is learning python")

Then for the console I did this:

treehouse : ~/workspace$ python hello.py Hello, World treehouse : ~/workspace$

Expected result was supposed to be this:

treehouse : ~/workspace$ python hello.py Hello, Nate Nate is learning python treehouse : ~/workspace$

What am I doing wrong?

Thanks, Nate

Nathaniel Agbontaen
Nathaniel Agbontaen
277 Points

Okay, I saved it before executing it, and it worked! Thank you so much Shem!