MathFun is about implementation of basic problems in maths.
Aim of this repo was to follow some guidelines on how to create a "good" Github Repo. Worked on basic Math problems with test cases.
Below are the functions and their descriptions which are in MathFun:
1. fibonacci(i): This function finds the ith number in the Fibonaci series, -1 otherwise.
2. factorial(i): This function return i! if i is in [1, 10], -1 otherwise.
3. isPrime(i): This function returns if i is a prime number or not.
4. prime(i): This function return the ith prime number if i is in [1, 100], -1 otherwise.
- Arpitha Vijayakumar ([email protected])
- Ishan Bhatt ([email protected])
- Krishika Shivnani ([email protected])
- Apurva Sonavane ([email protected])
- Unnati Nadupalli ([email protected])
In our project we implemented 4 functionalities
+ Generating N-th number in Fibonacci Series
+ Generating the factorial of a number
+ Checking if a number is Prime or not
+ Generating the N-th Prime number
We use the pytest package to test our code
The tests for the project are in /test/test_init.py
Steps to run tests locally
-
Download the project into you local computer.
-
Install the requirements.txt file on your computer
$ pip install -r requirements.txt -
Run the pytest command in the project root directory
$ pytest
Expected Output:
================================================================ test session starts =================================================================
platform win32 -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: C:\MathFun
collected 4 items
test\test_init.py .... [100%]
================================================================= 4 passed in 0.07s ==================================================================

