This API classifies numbers and provides interesting mathematical properties along with a fun fact.
-
Clone the repository:
git clone https://github.com/VirusEmp/Number_Classification.git
cd Number_Classification
-
Create and activate virtual environment and install dependencies: python -m venv venv(name of your virtual environment)
./venv/Scripts/activate (to activate the environment)
pip install -r requirements.txt
-
Run the application:
python Number_Classify.py
GET https://localhost/api/classify-number?number=371
Json { "number": 371, "is_prime": false, "is_perfect": false, "properties": ["armstrong", "odd"], "digit_sum": 11, "fun_fact": "371 is an Armstrong number because 3^3 + 7^3 + 1^3 = 371" }
Json
{ "number": "alphabet", "error": true, }