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

# Tag: libraries

# Rainbow Flag in Pygame

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

# 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 … More

# 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 … More

# 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 … More

# 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. … More

# 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 … More

# Square Spiral

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