Introduction to Python

This is a collection of introductory slides on Python that were used in a course given at the School of Mathematics, Statistics & Physics of Newcastle University in 2017. Please direct any queries to philipp.edelmann@newcastle.ac.uk.

How to install it

Should I get Python 2 or Python 3?

If you don’t have any legacy Python 2 code to maintain, you should go for Python 3. The course uses Python 3 but it will highlight the difference to Python 2 when they come up. With some care it is possible to write code that runs unchanged in Python 2 and Python 3.

Lectures

All slides from the introductory sessions are publicly available in a repository on Github. They are published under a free license, so reuse them if you like. Corrections and Contributions are appreciated.

Overview

The presentation is generated from a Jupyter notebook. You can use the raw notebook file with your local install of Jupyter or directly view it in slide or HTML notebook form.

You can start an instance of Jupyter using the command jupyter notebook.

Basics

raw notebook file slides HTML notebook

Classes

raw notebook file slides HTML notebook

Numpy

raw notebook file slides HTML notebook

Matplotlib

raw notebook file slides HTML notebook

Scipy

raw notebook file slides HTML notebook