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.
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.
Source Code & Usage
Python Implementation
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
Outcomes & Final Thoughts
This project successfully demonstrates the fundamentals of Python programming by creating a functional health utility. Key takeaways include:
-
Input Handling: Effectively captured and stored user data using the
input()function. - Data Type Conversion: Applied type casting to convert string inputs into integers for mathematical operations.
-
Conditional Logic: Utilized
if-elif-elsestatements to programmatically categorize numerical results.