Copyright (c) Theodore Norvell 2017. Licence: Creative Commons Noncommercial Attribution International 4.0.

This is a Jupyter notebook. See How to use these notes.

How to use these notes

These notes are written using Jupyter Notebook. This is a web app that lets me easily create the notes.

As mentioned in the Introduction, you don't need to use Python. You can use any programming language. Well, any programming language that supports recursion, which is to say almost any language you are likely to encounter except COBOL and older versions of FORTRAN.

If you are using Python

There are at least two ways to use these notes with Python.

Using Python with an IDE or text editor

If you are reading these notes on the web in HTML, you can follow along by using Python 3 in IDLE (or your favourite IDE) or just using a good text editor and the Pyhton 3 interpreter. You should be able to copy code from the web pages and paste it into your text editor. I'd suggest making one Python file per web page.

Using Python with Jupyter Notebook

However the best way to use these notes may be via the Jupyter Notebook app. After intalling Python 3 and Jupyter Notebook, you can download these notes from github and then view and edit them in Jupyter Notebook. This way you can easily add missing code to these notes and then execute the code very simply.

  • Install Jupyter. Intructions are here
  • Download or clone these notes from our github repository.
  • cd to the root directory and run 'jupyter notebook'
  • Your browswer should show the files in a tab called "Home".
  • Click on 'index.ipynb'

Using another language

This will be a little more work.

Translate the contracts and tests into the other language.

In [ ]: