This Quick Introduction to Python 3 aims to teach you just enough Python, so that you can get started in…

# Multi-pendulum Harmonograph simulator using numpy and matplotlib

This is a simple harmonograph simulator to generate random-ish harmonographs. It asks for the number of pendulums, and exits if…

# Eight Queens Puzzle – Six Lines

‘Eight Queens Puzzle’ is a classic chess puzzle, where you are challenged to place 8 queens, of the same colour, onto…

# A Neural Network in Python, Part 2: activation functions, bias, SGD, etc.

This is Part 2 of A Neural Network in Python, which was a very simple neural network to learn the…

# A Neural Network in Python, Part 1: sigmoid function, gradient descent & backpropagation

In this article, I’ll show you a toy example to learn the XOR logical function. My objective is to make it…

# Ramanujan’s 129th Birthday

Someone on Reddit pointed out that today (Dec 22nd) is Ramanujan’s 129th birthday. One of the commenters further pointed out…

# Easy AI with Python 3

Survey several basic AI techniques implemented with short, open-source Python code recipes. Appropriate for educators and programmers who want to…

# Have we already seen this number? (deja vu again)

I had a phone interview for a Python job the other day. It started out really well, he was very…

# Hello World 2, in Python 3

Hello World is the famous minimal introductory program for many programming languages. But as soon as it’s served its purpose, it’s discarded…

# Spectral Harmonographs

This Python + Pygame program draws the trace of 4 decaying sine waves, 2 per axis, with rainbow colours. It…

# Harmonograph in Pygame

You may have seen those devices at the Science Museum or Exploratorium or Techniquest… There’s a drawing surface and some…

# Number guessing game

The number guessing game incorporates several simple but important elements of elementary programming and is a good candidate for an…

# Popular Sorting Algorithms

Sorting is probably the most common type of algorithm in programming. A sorting algorithm puts elements of a list in a certain…