The terminal
Not met yet
A terminal runs one command at a time: type it, press Enter, read what comes back. It is always in a folder, and commands look for files there. cd folder moves into a folder, cd .. moves up one, ls (or dir on Windows) lists what is here, and python hello.py runs hello.py with Python. Anything after the file name reaches the program in sys.argv.
Try it
main.pyOutput
Press Run and what your program prints shows up here.
Easy to get wrong
- Thinks a command finds files wherever they are, whatever folder the terminal is in.
- Types a Python file's name on its own and expects the terminal to run it with Python.