Coronavirus (Covid-19): Latest updates and information
Skip to main content Skip to navigation

Python Induction

Python is a general-purpose programming language which is crucial to several of the core HetSys training modules. Many of the workshops in these modules involve interactive notebooks written in this language, and while these do not involve in-depth programming, they are much more approachable for students with more familiarity with the language. We find a lot of our students are already familiar with it to some degree, but several will not be, and it is important that incoming students make use of the summer vacation before they start the taught course to improve their knowledge of the language.

This is a set of links to online tutorials for you to carry out some self-guided learning of the Python programming language. This material is designed to be completed at your own pace. In the first weeks of the PX913 module, you will have some lectures on Python which will consolidate your understanding, but these will assume you have studied introductory material and have got some practical experience with the basic functionality of things like loops, datatypes such as lists and dictionaries, calling and defining functions and importing modules.

  1. The website of the Python project contains a simple introduction to getting python set up on your own computer and a basic python tutorial. Parts 1-4 (up to 4.6) are enough to get you up-and-running workshop code. It is quite long-winded but assumes no prior knowledge and is ideal for beginners:
    https://docs.python.org/3/tutorial/ 
  2. The website of the SciPy (Scientific Python) project then takes you further in the direction of using Python for scientific applications. Parts 1.1-1.3 largely repeat what is covered above - the most relevant parts are 1.4 and 1.5: https://scipy-lectures.org/intro/index.html
  3. NumPy is a Python package used by nearly everyone doing any kind of scientific computing in Python. It allows you to manipulate arrays of floating-point data with a level of computational efficiency close to that of compiled code. Two pieces of introductory material can be found on their website: a "quickstart" guide (which despite its name is quite long!) at https://numpy.org/devdocs/user/quickstart.html and an "absolute beginners" guide at https://numpy.org/devdocs/user/absolute_beginners.html
  4. The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. They can be used in particular for Python-based interactive notebooks, and indeed that is the format for a number of assessed workshops within our training programme. The Project Jupyter homepage has extensive introductory material. There is also a Jupyter/NumPy tutorial here: https://github.com/kuleshov/cs228-material/blob/master/tutorials/python/cs228-python-tutorial.ipynb

In the Python Induction Session in Welcome Week, we will try a simple Jupyter Notebook-based Python excercise.

The notebook we will work from can be found here: HetSys Python Induction Notebook