Lesson 2
The Basic Elements
Chapter 3: Running Python
Running Python
There are several ways to use the Python interpreter.
- Interactively (useful for quick testing and experiments)
- Run the code (useful for larger chunk of codes)
- Using an IDE (useful for large projects)
We will discuss these in the next few pages.
Whenever my example says run python, you should replace it with the appropriate python installation for your machine. It could be one of these:
pythonpython3python3.14
Whenever I say ‘command line’ or ‘terminal’, use the appropriate application for your operating system.
- For Windows, this will be the Terminal app running one of these: PowerShell, Command Prompt, or Ubuntu on WSL.
- For macOS and Linux/UNIX, this would be ‘Terminal’ or
bash.
You likely will need to use command lines a lot for your degree. If you need an introduction to command lines, see this tutorial: Introduction to the command-line interface. MSc AI students will get an introduction to Linux Shell commands during your orientation in your first week.