Infinite Quarter Series

The infinite quarter series is a series where each term is a quarter of the previous one:

We can visually represent this series by dividing a canvas (or price of paper) into 4 quadrants and colouring in one quadrant (bottom left). Then we repeat this process by dividing the top right quadrant into 4 and so on.


By doing so infinitely we will colour in a third of the initial canvas. This is because this infinite series converges to the value of 1/3.

Visual Demosntration using Python Turtle

Your Challenge

It is possible to visually represent this series using a triangle instead of a square.
Your task is to adapt the above Python script to represent this series using a triangle.

Share Button
Posted in Computer Science, Python - Advanced, Python Challenges Tagged with: , ,

Our Latest Book