A simple yet effective Python command-line application that calculates your Body Mass Index (BMI) and categorizes your health status based on your input weight and height. Perfect for beginners learning input handling and conditional logic in Python!
✅ BMI Calculation – Computes BMI using standard formula:
BMI = weight (kg) / height² (m²)
Health Categories:
| Category | BMI Range |
|---|---|
| Underweight | < 18.5 |
| Normal weight | 18.5 – 24.9 |
| Overweight | 25.0 – 29.9 |
| Obesity | ≥ 30.0 |
Error Handling – Prevents crashes for invalid inputs or zero height.
User-Friendly Interface – Simple prompts and clean output.
$ 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
Ensure you have Python 3.x installed:
python --version2️⃣ Clone the Repository
git clone https://github.com/mantrapatil03/python-beginner-friendly-projects.git
3️⃣ Navigate to the BMI Calculator folder
cd python-beginner-friendly-projects/bmi-calculator
4️⃣ Run the Script
python bmi_calculator.py
- Takes user input for weight (kg) and height (m)
- Computes BMI with the formula:
bmi = weight / (height ** 2)
- Displays the BMI value (rounded to 2 decimals)
- Categorizes result into:
- Underweight
- Normal weight
- Overweight
- Obesity
| Feature | Status | Description |
|---|---|---|
| Save results to file | Planned | Store BMI history in text/CSV |
| Health tips | Planned | Show fitness advice per category |
| GUI version | Planned | Build a Tkinter-based interface |
| Web version | Planned | Create a Flask-based BMI web app |
Contributions are welcome! 🎉 To contribute:
- Fork this repo
- Create a new branch (feature/your-feature)
- Commit changes
- Push and open a PR
Mantra Patil
💼 LinkedIn: https://www.linkedin.com/in/mantrapatil25