Back to Projects

PYTHON PROJECT

BMI Calculator

A Python-based health utility that calculates Body Mass Index (BMI) and provides instant health classifications based on user input, using Imperial units.

Python User Input Control Flow Data Casting

Overview & Logic

This project is a beginner-friendly Python script designed to demonstrate core programming concepts such as variables, input handling, mathematical operations, and conditional logic. It automates the calculation of BMI using standard English units (pounds and inches) and categorizes the result into health ranges.

BMI = (Weight * 703) / (Height * Height)
Underweight
≤ 18.5
Normal Weight
18.5 - 24.9
Overweight
24.9 - 29.9
Obese
≥ 30

Source Code & Usage

Python Implementation

bmi_calc.py
name = input("Enter name: ")
w = int(input("Weight (lbs): "))
h = int(input("Height (in): "))

bmi = (w * 703) / (h * h)
print(f"BMI: {bmi:.2f}")

if bmi <= 18.5: print("Underweight")
elif bmi <= 24.9: print("Normal Weight")
elif bmi <= 29.9: print("Overweight")
else: print("Obese")

Terminal Output

zsh — python3 main.py
bmi-project git:(main) python3 main.py
Enter name: Sai
Weight (lbs): 132
Height (in): 61
BMI: 24.94
Normal Weight
bmi-project git:(main)

Outcomes & Final Thoughts

This project successfully demonstrates the fundamentals of Python programming by creating a functional health utility. Key takeaways include:

© 2026 Sai Suraj Matta. All rights reserved.