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 trialSilje Tellefsen
886 PointsIf I have a script named h_t.py saved as a file, then type the name of the file into the shell, what happens?
If I have a script named hello_treehouse.py saved as a file, then type file name into the shell (or command window of python saved in same folder), I would suppose that the script was run. Why is this not correct?
1 Answer
Per Schrijver
3,435 Points"hello_treehouse.py" is not a callable function, you could either try to open the file hello_treehouse.py in the python IDLE and then run it or run "python hello_treehouse.py" in command prompt. The anwser for this quiz is "python hello_treehouse.py".Good luck!
Silje Tellefsen
886 PointsSilje Tellefsen
886 PointsThanks. I finally got that you only write python hello_treehouse.py, NOTHING MORE. No explaining about "first you open...., then you run... etc." Couldn't they have just asked "what do you type in the shell in order to run the saved .py file?". :)