A simple command-line Body Mass Index (BMI) calculator written in Python. It takes a user's weight and height, calculates their BMI and then classifies the result into a standard weight category.
- Calculates BMI from weight (kg) and height (m)
- Classifies BMI into standard categories
- Validates input and re-prompts on invalid entries (non-numeric, zero or negative values)
- No external dependencies, uses only the Python standard library.
BMI = Weight (kg) / Height (m) ** 2
| BMI Range | Category |
|---|---|
| Below 18.5 | Underweight |
| 18.5 – 24.9 | Normal weight |
| 25.0 – 29.9 | Overweight |
| 30.0 and above | Obesity |
- Python 3.7 or higher.
- Clone the repository:
git clone https://github.com/AdarshZolekar/BMI-Calculator.git cd BMI-Calculator - No dependencies to install, the project only uses Python's standard library.
python bmi_calculator.py=== BMI Calculator ===
Enter your weight in kilograms: 70
Enter your height in meters: 1.75
Your BMI is: 22.86
Category: Normal weight
BMI-Calculator/
│
├── README.md
├── bmi_calculator.py
├── requirements.txt
├── .gitignore
└── LICENSE
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome!
-
Open an issue for bugs or feature requests
-
Submit a pull request for improvements.