Welcome to the BMI Calculator page.
This page contains a brief description and implementation instructions for the project.
Project Description
Calculates Body Mass Index (BMI) from a user’s weight and height to classify underweight, normal, overweight, or obese status. The program prompts for weight (kg) and height (m), computes BMI = weight/(height²), and displays the result and category.
Project Requirements
Python 3.x (no external libraries needed).
How to Run the Project
- Write a script (e.g.
bmi_calculator.py
) that reads weight and height (usinginput()
) and computes BMI. - Run it:
python bmi_calculator.py
. - Enter your weight and height when prompted; the program outputs your BMI and category.
Key Concepts Learned
Arithmetic operations, variable assignment, input validation (e.g. ensure positive values), and if-elif
logic for categorizing BMI. This reinforces basic math operations and user I/O.
Possible Extensions
Allow units in pounds/inches (convert units); loop to allow multiple calculations; add error handling for invalid input (non-numeric or zero height); graphical output (e.g. a bar showing BMI).