Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

BMI Calculator (Python)

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!


Features

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.


Example Demo

$ 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

Installation & Setup

1️⃣ Prerequisites

Ensure you have Python 3.x installed:

python --version

2️⃣ 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

How It Works

  • 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:
    1. Underweight
    2. Normal weight
    3. Overweight
    4. Obesity

Future Roadmap

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

Contributing

Contributions are welcome! 🎉 To contribute:

  • Fork this repo
  • Create a new branch (feature/your-feature)
  • Commit changes
  • Push and open a PR

Author

Mantra Patil

💼 LinkedIn: https://www.linkedin.com/in/mantrapatil25

✉️ techmantrapatil@gmail.com

⭐ If you found this project helpful, don’t forget to star the repo! ⭐