This is an archived version of the course. Please find the latest version of the course on the main webpage.

Chapter 3: Running Python

Running Python

face Josiah Wang

There are several ways to use the Python interpreter.

  1. Interactively (useful for quick testing and experiments)
  2. Run the code (useful for larger chunk of codes)
  3. 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:

  • python
  • python3
  • python3.8

Whenever I say ‘command line’ or ‘terminal’, use the appropriate for your operating system.

  • For Windows, this could be PowerShell, Command Prompt or a WSL2 command line terminal.
  • For macOS and Linux/UNIX, this would be ‘Terminal’ or bash.

If you need help with command lines, see a quick introduction prepared by Nuri, one of our teaching scholars. You should be able to see the text, but will only be able to access the videos once you have a College user account.