As part of the web course at NTNU. Our assignment was to make a program that estimates pi using Archimedes method. His way of calculating pi was to create polygons inside a circle and calculate the area of each side using Pythagorean theorem.
If we keep adding sides to the polygon, the more accurate our calculation of pi would be.
- Navigate to the directory of the file using terminal.
- Type in "python main.py"
- Behold, our estimate of pi using the same concept as Archimedes!