Code Monkey home page Code Monkey logo

100pi's Introduction

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 file in the compute_PI folder.
  3. Write your code in the file. Make sure you write a function that returns the result of the computation.
  4. Test it using test_PI/test_PI.py.
  5. Commit your changes in a new branch.
  6. 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: 3%

100pi's People

Contributors

chellyahmed avatar franci3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.