Programming with Python

Published

January 14, 2026

Overview

This course is an python programming course for beginners. It introduces students to the fundamentals of python, one of the most widely used, syntactically easy, and versatile programming languages. The course is designed for learners with no prior programming experience in any language and covers coding basics principles as well as python syntax, data types, operators, control structures (if, elif, else, for, while, try, except), and simple functions. We will also briefly cover working with files, software management, object oriented programming and context managers. Do not worry if you do not know what these terms mean - you will learn in this course! The course is taught in an interactive way with exercises and working examples throughout.

TipLearning Objectives
  • Understand why coding using python can be useful both for every day tasks and for work related tasks.
  • Be familiar with python syntax, data types, operators, control structures, functions and be able to utilise them when coding
  • Have awareness of how to work with files and install libraries
  • Have an awareness and basic understanding of the object oriented programming paradigm
  • Leave the course with a working python setup on your local machine and/or be comfortable starting to use an online platform e.g. google colab for personal use
  • Leave the course with a cheat sheet and examples which you are comfortable adapting for your own use cases

Target Audience

The target audience is beginners to coding and those who want to get started learning python.

Prerequisites

No coding prerequisits are needed. Please follow the data and setup page instructions to install the required software

Exercises

The majority of exercises here are simple and doable for all participants. there are however some stretch exercises that can be completed by those more competent, or at a later date to test yourself.

Exercises in these materials are labelled according to their level of difficulty:

Level Description
Exercises in level 1 are simpler and designed to get you familiar with the concepts and syntax covered in the course.
Exercises in level 2 combine different concepts together and apply it to a given task.
Exercises in level 3 require going beyond the concepts and syntax introduced to solve new problems.

Citation & Authors

Please cite these materials if:

  • You adapted or used any of them in your own teaching.
  • These materials were useful for your research work. For example, you can cite us in the methods section of your paper: “We carried our analyses based on the recommendations in YourReferenceHere”.

You can cite these materials as:

"Shah", "., Tavares, H. (2025). "Programming with Python". "https://cambiotraining.github.io/python-programming/"

Or in BibTeX format:

@misc{YourReferenceHere,
  author = {"Shah", "Kavi" and Tavares, Hugo},
  month = {4},
  title = {"Programming with Python"},
  url = {"https://cambiotraining.github.io/python-programming/"},
  year = {2025}
}

About the authors:

  • "Kavi" "Shah"
    Affiliation: "Department of Genetics, University of Cambridge"
    Roles: "conceptualisation; primary author; data curation; coding; software"
  • Hugo Tavares
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: conceptualisation; editing

Acknowledgements

  • List any other sources of materials that were used.
  • Or other people that may have advised during the material development (but are not authors).