Tag: libraries

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 Beginner

Rainbow Flag in Pygame

This little Pygame program paints the Rainbow Flag, as used by the LGBT movement. It illustrates: Importing the Pygame library… read more Rainbow Flag in Pygame

Hilbert curve
Posted in Fractals Intermediate Turtle

Drawing Fractals with Lindenmayer Systems

Lindenmayer systems, or L-systems, provide a very powerful way to construct fractals. Lindenmayer used L-systems to describe the behaviour of… read more Drawing Fractals with Lindenmayer Systems

Posted in Beginner Turtle

A Fake Circle made of Straight Lines

Inspired by this post on Reddit, I wrote this little script to do the same thing. The circle is an… read more A Fake Circle made of Straight Lines

Posted in Beginner Games

A Graphical Dice Simulator

This PyGame program simulates the roll of a die (or dice if you prefer). It’s a fairly simple, straightforward thing… read more A Graphical Dice Simulator

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 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 Beginner Turtle

Square Spiral

This is a very simple introduction to Turtle graphics. The turtle starts in the middle of the window, moves forward… read more Square Spiral