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

Getting syntax error when trying to run hello.py

when i do the same as the video and try to run, i'm given a syntax error. when hit tab after typing python, a space is all that appears. what haver i forgotten?

Ricky White
Ricky White
8,799 Points

Are you able to share your code / screen so we can see what the problem is?

Grigorij Schleifer
Grigorij Schleifer
10,364 Points

Hey joseph, are you typing python hello.py ?

2 Answers

I was stuck with this too, remember to save if there's a red dot next to the script name. Either through the menu or by ctrl + s. Then run after that, it should work :)

This is the code from the end of the video

first_name = 11

print("Hello, Craig")
print("Hello,", first_name)

print("Craig is learning Python")
print(first_name, "is learning Python")


Hello, Craig Hello, 11 Craig is learning Python 11 is learning Python