|
1 | | -## ⚖ BMI Calculator |
| 1 | +<h1 align="center"> BMI Calculator (Python)</h1> |
2 | 2 |
|
3 | | -A Python command-line application that calculates your Body Mass Index (BMI) and tells you your health category. 🏃♂💪 |
| 3 | +<p align="center"> |
| 4 | +A simple yet effective <b>Python command-line application</b> that calculates your <b>Body Mass Index (BMI)</b> |
| 5 | +and categorizes your health status based on your input weight and height. |
| 6 | +Perfect for beginners learning input handling and conditional logic in Python! |
| 7 | +</p> |
4 | 8 |
|
5 | | -## 📝 Features |
| 9 | +<p align="center"> |
| 10 | + <a href="https://www.python.org/"><img src="https://img.shields.io/badge/Python-3.x-blue?style=for-the-badge&logo=python"></a> |
| 11 | + <a href="#"><img src="https://img.shields.io/badge/Platform-Terminal%2FCMD-orange?style=for-the-badge&logo=windowsterminal"></a> |
| 12 | + <a href="https://github.com/mantrapatil03/python-beginner-friendly-projects"><img src="https://img.shields.io/github/stars/mantrapatil03/python-beginner-friendly-projects?style=for-the-badge&logo=github"></a> |
| 13 | + <a href="#"><img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge&logo=opensourceinitiative"></a> |
| 14 | +</p> |
6 | 15 |
|
7 | | -Calculates BMI using your weight and height. |
| 16 | +--- |
8 | 17 |
|
9 | | -Categorizes BMI into Underweight, Normal weight, Overweight, or Obesity. |
| 18 | +## Features |
10 | 19 |
|
11 | | -Handles invalid inputs gracefully ❌. |
| 20 | +✅ **BMI Calculation** – Computes BMI using standard formula: |
| 21 | +> BMI = weight (kg) / height² (m²) |
12 | 22 |
|
13 | | -Simple, interactive, and user-friendly interface. |
| 23 | + **Health Categories:** |
| 24 | +| Category | BMI Range | |
| 25 | +|-----------|------------| |
| 26 | +| Underweight | < 18.5 | |
| 27 | +| Normal weight | 18.5 – 24.9 | |
| 28 | +| Overweight | 25.0 – 29.9 | |
| 29 | +| Obesity | ≥ 30.0 | |
14 | 30 |
|
| 31 | +> **Error Handling** – Prevents crashes for invalid inputs or zero height. |
| 32 | +>**User-Friendly Interface** – Simple prompts and clean output. |
15 | 33 |
|
16 | | -## 🎬 Demo |
| 34 | +--- |
| 35 | + |
| 36 | +## Example Demo |
17 | 37 | ``` |
18 | 38 | $ python bmi_calculator.py |
19 | 39 |
|
20 | | -BMI Calculator |
| 40 | +⚖️ BMI Calculator |
21 | 41 |
|
22 | 42 | Enter your weight in kilograms: 70 |
23 | | -
|
24 | 43 | Enter your height in meters: 1.75 |
25 | 44 |
|
26 | 45 | Your BMI is: 22.86 |
27 | | -
|
28 | 46 | Category: Normal weight |
29 | 47 | ``` |
30 | | -## 🛠 Installation |
31 | | - |
32 | | -1. Make sure you have `Python 3.x` installed 🐍. |
33 | | - |
34 | 48 |
|
35 | | -2. Clone this repository: |
| 49 | +--- |
36 | 50 |
|
| 51 | +## Installation & Setup |
37 | 52 |
|
| 53 | +### 1️⃣ Prerequisites |
| 54 | +Ensure you have **Python 3.x** installed: |
| 55 | +```bash |
| 56 | +python --version |
38 | 57 | ``` |
39 | | -git clone https://github.com/mantrapatil03/python-beginner-friendly-projects/bmi-calculator.git |
| 58 | +2️⃣ Clone the Repository |
40 | 59 | ``` |
41 | | -3. Navigate to the project folder: |
42 | | - |
43 | | - |
| 60 | +git clone https://github.com/mantrapatil03/python-beginner-friendly-projects.git |
44 | 61 | ``` |
45 | | -cd bmi-calculator |
| 62 | +3️⃣ Navigate to the BMI Calculator folder |
46 | 63 | ``` |
47 | | -4. Run the program: |
48 | | - |
49 | | - |
| 64 | +cd python-beginner-friendly-projects/bmi-calculator |
| 65 | +``` |
| 66 | +4️⃣ Run the Script |
50 | 67 | ``` |
51 | 68 | python bmi_calculator.py |
52 | 69 | ``` |
53 | | -## 💡 Usage |
54 | 70 |
|
55 | | -Enter your weight in kilograms. |
| 71 | +### How It Works |
| 72 | +- Takes user input for weight (kg) and height (m) |
| 73 | +- Computes BMI with the formula: |
| 74 | +``` |
| 75 | +bmi = weight / (height ** 2) |
| 76 | +``` |
| 77 | +- Displays the BMI value (rounded to 2 decimals) |
| 78 | +- Categorizes result into: |
| 79 | + 1. Underweight |
| 80 | + 2. Normal weight |
| 81 | + 3. Overweight |
| 82 | + 4. Obesity |
| 83 | + |
| 84 | +## Future Roadmap |
| 85 | +| Feature | Status | Description | |
| 86 | +| ----------------------- | :-------: | -------------------------------- | |
| 87 | +| Save results to file | Planned | Store BMI history in text/CSV | |
| 88 | +| Health tips | Planned | Show fitness advice per category | |
| 89 | +| GUI version | Planned | Build a Tkinter-based interface | |
| 90 | +| Web version | Planned | Create a Flask-based BMI web app | |
| 91 | + |
| 92 | +## Contributing |
| 93 | + |
| 94 | +Contributions are welcome! 🎉 |
| 95 | +To contribute: |
| 96 | +- Fork this repo |
| 97 | +- Create a new branch (feature/your-feature) |
| 98 | +- Commit changes |
| 99 | +- Push and open a PR |
| 100 | + |
| 101 | +## Author |
| 102 | +**Mantra Patil** |
| 103 | + |
| 104 | +💼 LinkedIn: https://www.linkedin.com/in/mantrapatil25 |
56 | 105 |
|
57 | | -Enter your height in meters. |
| 106 | +✉️ techmantrapatil@gmail.com |
58 | 107 |
|
59 | | -The program calculates your BMI and shows your category. |
60 | 108 |
|
61 | | -Make sure to enter positive numeric values only. |
| 109 | +<h3 align="center">⭐ If you found this project helpful, don’t forget to star the repo! ⭐</h3> <p align="center"> <img src="https://img.shields.io/badge/Keep%20Coding%20%26%20Stay%20Healthy!-Python-blue?style=for-the-badge&logo=python"> </p> |
0 commit comments