## Generating Random Graphs in Python

Random Graphs in Python for A Level Computer Science and Beyond The jupyter notebook below shows an implementation of an algorithm for generating a random undirected, unweighted graph. The algorithm uses the Erdős–Rényi model, but you don’t need to know about that to understand how it works – the pseudo code makes is quite clear, […]

## Python for GCSE Science and Maths

It often surprises me how little integration there seems to be between Computer Science and other STEM subjects. Just think of the possibilities! Python is the language of choice for working with data in a vast range of professional fields. Astronomy? Of course. Marine Biology? You bet. Financial Analyst? Yep! Wouldn’t it be good to […]

## Circle Sector Challenge for GCSE Computer Science

Maths GCSE and Computer Science GCSE are often taught very separately, and yet they make excellent companions. Writing a program to explore a topic from Maths can really help to understand the topic deeply as well as providing a great opportunity to practice your coding skills. Here’s a fun challenge to keep your programming skills […]

## Installing Python Packages with Pip

When you install Python on your computer, it comes with the standard library which is a collection of modules that allow you to do all sorts of useful things such as mathematical calculations, interacting with the operating system, building GUIs (Graphical User Interfaces) and much more. However, it doesn’t stop there. There are thousands of […]

## BBC micro:bit Introduction

A couple of years ago the BBC distributed nearly a million BBC Micro:bits to schools in the UK as part of the BBC’s Make it Digital initiative. It was generally considered a resounding success, as described for example in this article from the BBC website. The BBC Micro:bit is a pocket-sized programmable computer which you […]

## Python Turtle Graphics Demos

If you are using the standard installation of Python from python.org which comes with the IDLE editor, there are some exciting demonstrations of the power of the turtle module available at the click of a mouse. The turtle module is hugely useful for learning about and teaching programming, and also great fun. It provides a […]

## Fun with Cats – Python API Calls

One of the great things about Python as a programming language is that you can do fairly powerful things with just a few lines of code. In this article we are going to look at how to do a simple API call in Python to retrieve a random cat and display it on the screen. […]

## Calculating Distance with Python

Calculating distance with Python I am very keen to help people connections between Maths and Computer Science. Above is a game I wrote using JavaScript. When you click on an “x” you have a 50% chance of being told the distance from the treasure. Distance between points on a 2D plane is something we calculate […]

## Introduction to Recursion in Python

It was a dark night, the night was dark and the robbers were in a cave. One robber said to the other “tell us a tale,” and this is the tale he told… It was a dark night, the night was dark and the robbers were in a cave. One robber said to the other […]

## Insertion Sort for GCSE and A Level Computer Science

Insertion sort is one of the standard algorithms you will come across studying Computer Science for GCSE and A Level. There are many different versions of the code for it scattered across the internet, but there are basically three common “flavours” you will find. In this article we will look at some Python implementations. First […]