## Prime Remainders

This program calculates primes, takes their remainder¹ and then places a color accordingly. The shapes are quiet interesting.

#### Controls

• Space takes a screenshot

¹The formular for the color c at prime p with modulo m is c = p mod m. (m = 10 on the left, 255 on the right and 500 on the bottom)

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 4th of November, 2015
#         edited 5th of November, 2015
#         edited 6th of November, 2015
Advertisements

## Langton’s Ant

This program is a simulation of Langton’s Ant. The following image shows the ant on its highway.

#### Controls

• F1 takes a screenshot
• Space stops and resumes the ant’s movement

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 27th of October, 2015
#         edited 29th of October, 2015

## e Generator

By using the formula $\big(1 + \frac{1}{n}\big)^n$ for a big number $n$, you can approximate the mathematical constant $e$.

# Python 2.7.7 Code
# Jonathan Frech 23rd of October, 2015