Category: Basic
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… read more Ramanujan’s 129th Birthday
Number guessing game
The number guessing game incorporates several simple but important elements of elementary programming and is a good candidate for an… read more Number guessing game
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… read more Popular Sorting Algorithms
Stars and Stripes
A variation on the Stars and Stripes American Flag for Independence Day. It’s an exercise in the use of transparency in… read more Stars and Stripes
Playing in Python with Pickover’s Premise per Pi
My favourite tweeter is Clifford A. Pickover. His tweets are delightful nuggets of math, physics & more. I have a copy… read more Playing in Python with Pickover’s Premise per Pi
A Python Dictionary
This is simply a dictionary of Python keywords, implemented as – of course – a Python dictionary! Dictionaries are key:value… read more A Python Dictionary
Easy Graph Plotting with Pyplot
Graphs (also known as charts) are an indispensible visual aid for conveying a lot of data in an easy-to-digest form…. read more Easy Graph Plotting with Pyplot
Binary Search
Binary Search is one of the most fundamental computer algorithms. Given an ordered list of some data (names, numbers, …)… read more Binary Search
Random Walk
A colourful random walk. The basic idea is very simple: choose a random heading in the range 0:360 degrees. Step… read more Random Walk
Sierpinski Triangle, drawn by a Turtle
This is a classic fractal drawn with a recursion algorithm and Turtle graphics. The Sierpinski Triangle’s sides are bisected and… read more Sierpinski Triangle, drawn by a Turtle
Naive Mandelbrot Set
This is your basic Mandelbrot Set plotter. Very little effort made to speed it up, except for plotting top &… read more Naive Mandelbrot Set
FizzBuzz
This is apparently a well-known interview question (but not one I was ever asked). Print the numbers 1 to 100,… read more FizzBuzz









