The Modulo Operator in Python

The modulo operator is used in Python programming when you need to find the remainder of integer division. It comes up in many important algorithms, and is represented by the symbol %....

2-Dimensional Lists in Python

2-dimensional lists are an extremely important data structure in Python programming, with many applications. They can be very confusing to begin with, and you should make sure you are confident and competent...

A Puzzle About Socks

Here’s a puzzle to help practice your computational thinking skills. Don’t forget to take it slowly and think through your answer carefully before committing. A sock drawer contains ten pairs of black...

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...

Flowcharts for GCSE Computer Science

Representing algorithms for GCSE Computer Science There are several ways to represent algorithms for GCSE Computer Science: Structured English Flowchart Pseudocode Program statements in a particular language In this article we are...

Pascal’s Triangle with Python

Coding Pascal’s Triangle with Python is a fun intermediate-level challenge. Pascal’s Triangle is a fascinating mathematical structure which contains many patterns. Each element in a row is formed by adding the two...