Skip to content

ChellyAhmed/100Pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

100Pi

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!

How to Contribute

  1. Fork this repository.
  2. Create a new branch. (You can name it whatever you want)
  3. Create a new file in the compute_PI folder.
  4. Write your code in the file. Make sure you write a function that returns the result of the computation.
  5. Test it using test_PI/test_PI.py.
  6. Commit your changes in a new branch.
  7. Create a pull request.

How to Test Your Code

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.

The Game Rules

  1. For now, we only accept Python code. We might consider accepting other languages in the future.
  2. The function should return the number PI to a certainty of 0.0001.
  3. The function should not take any arguments.
  4. The function should return a float.
  5. The function should be in a separate new file under compute_PI.
  6. 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.
  7. No one cares about the performance of your code. We only care about the result.
  8. 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.
  9. No one will judge you if your code is weird or not optimized. We are here to have fun and be creative.
  10. You can submit as many functions as you want. The more, the merrier!

Goal: 100 Functions before PI Day

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: 10% Last update: October 8th, 2024

First 3 Contributors:

Why you should star this repo:

  1. It makes you look cool. (which you are!)
  2. It makes the repo looks cool. (which it is!)
  3. You'll be able to say "I contributed to a repo with a large number of stars!"

About

100 different creative ways to compute the number Pi !

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages