Here, we show the world that engineering is not just about computations and mathematics, it is also about creativity and fun! In this repository, we come up with 100 different ways to print the number PI to a certainty of 0.0001.
Whether you're a mathematician, programmer, or a creative thinker, this repository welcomes your contribution. You have the freedom to employ complex mathematical algorithms, computer science tricks, or even unleash your creativity to devise unconventional methods for calculating PI.
The only goal is to return the number PI to a certainty of 0.0001. You can print it in any format you want, but it has to be readable and understandable.
Please don't hesitate to share your code with us, we would love to see how you did it!
- Fork this repository.
- Create a new file in the
compute_PI
folder. - Write your code in the file. Make sure you write a function that returns the result of the computation.
- Test it using
test_PI/test_PI.py
. - Commit your changes in a new branch.
- Create a pull request.
To test your code, you just need to call the test_PI(yourFunctionThatReturnsFloat())
function in test_PI/test_PI.py
. If an exception is raised, it means that your code is not correct.
- For now, we only accept Python code. We might consider accepting other languages in the future.
- The function should return the number PI to a certainty of 0.0001.
- The function should not take any arguments.
- The function should return a float.
- The function should be in a separate new file under
compute_PI
. - The function should be tested using the
compute_PI/test_PI.py
file. You can call the test function within your code as many times as you want. - No one cares about the performance of your code. We only care about the result.
- You don't need to explain how your code works. We will figure it out ourselves. Although, you can leave a comment or two if you want. It's totally up to you.
- No one will judge you if your code is weird or not optimized. We are here to have fun and be creative.
- You can submit as many functions as you want. The more, the merrier!
Let's join forces and embark on an exciting journey to compute PI in 100 unique and fascinating ways before March 14th, 2025. Progress will be updated regularly
Current Progress: 3%