Category: Basic

1729
Posted in Basic Numbers

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

Posted in Basic Numbers

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

Posted in Basic

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

Posted in Basic

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

Posted in Basic Numbers

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

Posted in Basic Text

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

Posted in Basic Pyplot

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

Posted in Basic Numbers

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

Posted in Basic Turtle

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

Posted in Basic Turtle

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

Posted in Basic Fractals

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

Posted in Basic Numbers

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