This BMI Calculator is a simple desktop application built using Python, Tkinter for the GUI, Pillow for image handling, and OpenPyXL for saving data to an Excel file. The application allows users to input their height, weight, and age to calculate their Body Mass Index (BMI) and classify it into categories such as underweight, normal weight, overweight, and obese. The results are displayed in the application and saved to an Excel file.
- Calculate BMI based on user input.
- Classify BMI into categories.
- Save BMI results to an Excel file.
- Clear input fields and previous results.
- User-friendly interface with hover effects on buttons.
- Python 3.x
- Tkinter (included with Python)
- Pillow
- OpenPyXL
-
Clone the repository:
git clone https://github.com/yourusername/bmi-calculator.git cd bmi-calculator
-
Install the required packages:
pip install pillow openpyxl
-
Run the application:
python bmi_calculator.py
-
Input your data:
- Enter your first name, last name, height (in meters), weight (in kilograms), and age.
-
Calculate BMI:
- Click the "Calculate" button to calculate your BMI and display the result.
-
Clear entries:
- Click the "Clear" button to clear all input fields and previous results.
-
Check the results:
- The BMI result and category will be displayed in the application.
- The results will also be saved to an Excel file named
bmi_results.xlsx
in the same directory.
bmi_calculator.py
: The main Python script for the BMI Calculator application.logo.png
: The icon image for the application window.bmi_results.xlsx
: The Excel file where BMI results are saved.
Contributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the MIT License. Please take a look at the LICENSE file for details.
If you have any questions or suggestions, please contact [email protected].
- Thanks to Tkinter, Pillow, and OpenPyXL developers for providing the tools to build this application.