HermanErKu / calculate-pi-visual-output

These Python scripts will calculate pi for you

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

calculate-pi visual-output

These Python scripts will calculate pi for you

The calculate-pi script will will calculate pi for you in the terminal. You can change the "points" variable to get a more excact pi, but this will take longer time.

The calculate-pi-visual script will calculate pi for you in the terminal, but it also opens a 500x500px window where it shows you all the points it places. You will be asked in the terminal how many points you want to place. This script will use a bit more time than the non-visual script.

How to use

These scripts are very simple and easy to use.
All of the scripts were made in python 3.9, and if you have any problems running them, make sure your pc has python 3.9 installed.

If you have python installed on your pc, you should be able to run this script without installing anything more. Just download the script and double click it. To get a more excact result, you can change the "points" variable in the script to something higher.

To use this script you have to install pygame. This is very easy. You just need to open your terminal and type "pip install pygame". If this does not work, make sure you have python installed on your pc. When you have installed pygame, you just need to doubleclick the script and it will ask you how many points you want to make

To-do

make .exe file

About

These Python scripts will calculate pi for you


Languages

Language:Python 100.0%