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 trialDaniel Pettersson
140 PointsCan't get script to work in console
At the very first video I cannot get my console to run the script Hello world - python hello.py
I get the error msg "syntax error near unexpected token 'python'
Any ideas?
4 Answers
David Bouchare
9,224 PointsWhich console are you using? Treehouse's workspace or your own terminal?
Also, have you tried typing 'python' in a terminal and run the hello world code?
Daniel Pettersson
140 PointsThe Treehouse workspace.
David Bouchare
9,224 PointsOK, and you have created a file called hello.py with the following code in it (or slightly similar):
print("hello, world")
Daniel Pettersson
140 PointsYes - I actually just got it to work, don't know how :)
Thanks!