Priya Kumari Python Mini Project ReporT
Priya Kumari Python Mini Project ReporT
A PROJECT REPORT
Submitted by
Chandigarh University
March 2024
1
BONAFIDE CERTIFICATE
Submitted to
Er. Mohit Bishist
Assistant Professor
CSE 2nd Year
2
ACKNOWLEDGEMENT
We extend our heartfelt gratitude to all those who have contributed to the successful completion of
this project on the "BMI CALCULATOR."
First and foremost, we would like to express our sincere appreciation to our project supervisor, „Mr.
Mohit Sir‟, whose guidance, encouragement, and insightful feedback have been invaluable
throughout the development process. Her expertise in the field of data science , machine learning and
unwavering support has been instrumental in shaping this project. We would also like to thank the
faculty members of the Department of Computer Science for their continuous support and
encouragement. We are immensely grateful to our peers and friends for their encouragement and
assistance during various stages of the project.
3
TABLE OF CONTENTS
REFERENCES .................................................................................................... 17
4
List of Figures
5
ABSTRACT
Body Mass Index (BMI) is a widely used measure for assessing an individual's
weight status and overall health. It provides a simple numeric indicator of a person's
body fatness based on their height and weight. The BMI Calculator project aims to
develop a user-friendly application that allows individuals to quickly and accurately
calculate their BMI and understand its implications for their health.
Through continuous refinement and updates based on user feedback and advancements
in technology, the BMI Calculator will strive to remain a valuable tool for health
assessment and promotion in the digital age.
6
CHAPTER 1: INTRODUCTION
➢ The objective of a BMI (Body Mass Index) Calculator project could be multifaceted,
depending on the context and the target audience. Here are some common objectives for
such a project:
➢ Health Awareness: The primary objective could be to raise awareness about the importance
of maintaining a healthy weight and understanding BMI as a basic indicator of health.
➢ Health Monitoring: The BMI Calculator can serve as a tool for individuals to monitor their
own weight status regularly and understand how it relates to their overall health.
➢ Education: Educating users about what BMI is, how it's calculated, what the different BMI
ranges mean in terms of health risks, and providing additional resources for healthy living.
➢ Customization: Providing options for users to input their personal data such as height,
weight, age, gender, and activity level to calculate a more personalized BMI and offer
tailored health recommendations.
➢ Integration: Integrating additional features such as tracking progress over time, setting
goals, connecting with healthcare professionals for further advice, or linking to resources
for healthy diet and exercise plans.
➢ Privacy and Security: Ensuring that user data is handled securely and privately, especially
if the BMI Calculator requires users to input personal information.
➢ Feedback and Improvement: Gathering feedback from users to continuously improve the
BMI Calculator, update information, and add new features based on user needs and
advancements in health science.
➢ Overall, the objective of a BMI Calculator project should be to promote health awareness,
encourage healthy lifestyle choices, and empower individuals to take control of their own
health and well-being.
9
CHAPTER 2: BACKGROUND STUDY
1. Understanding BMI :
• BMI is a measure of body fat based on a person's weight and height.
• It is calculated by dividing a person's weight in kilograms by the square of their height in
meters.
• The result is typically expressed in units of kg/m².
2. Significance of BMI :
• BMI is widely used as a screening tool to identify potential weight problems in adults.
• It provides a rough estimate of a person's overall health status based on their weight status.
• Different BMI ranges indicate underweight, normal weight, overweight, and obesity.
3. BMI Categories :
• Underweight: BMI less than 18.5
• Normal weight: BMI 18.5–24.9
• Overweight: BMI 25–29.9
• Obesity: BMI 30 or greater
4. BMI Calculation Formula :
• BMI = weight (kg) / height^2 (m^2)
5. Interpretation of BMI :
• BMI values provide a general guideline, but they don't account for factors like muscle mass,
bone density, and overall body composition.
• While BMI is a useful screening tool, it should be interpreted alongside other measurements
and clinical assessments.
6. Limitations of BMI :
• BMI doesn't differentiate between fat mass and lean body mass.
• It may not be accurate for certain populations, such as athletes or the elderly.
• Other health indicators, such as waist circumference and body composition analysis, may
provide additional insights.
7. Applications of BMI :
• BMI is used in various settings, including healthcare, fitness, and nutrition.
• It helps healthcare professionals assess individuals' risk for obesity-related diseases and plan
appropriate interventions.
• BMI is also used in epidemiological studies to analyze trends in population health.
8. BMI Calculator Project Objectives :
• Develop a user-friendly tool for calculating BMI based on weight and height inputs.
• Provide interpretation of BMI results and associated weight status categories.
• Consider additional features such as metric/imperial unit conversion, graphical representation
of BMI categories, and health recommendations.
By conducting a thorough background study, you'll gain insights into the relevance of BMI, its
calculation method, interpretation, limitations, and potential applications, which will inform the
development of your BMI Calculator project.
10
CHAPTER 3: METHODOLOGY
3.1 Methodology :
➢ The calculate_bmi function takes two parameters: weight (in kilograms) and
height (in meters). It calculates the BMI by dividing weight by the square of
height (BMI = weight / height^2) and returns the calculated BMI value.
def interpret_bmi(bmi):
"""
Function to interpret BMI value
:param bmi: BMI value
:return: interpretation
"""
if bmi < 18.5:
return "Underweight"
elif 18.5 <= bmi < 25:
return "Normal weight"
elif 25 <= bmi < 30:
return "Overweight"
else:
return "Obese"
def main():
print("Welcome to BMI Calculator")
weight = float(input("Enter your weight in kilograms: "))
height = float(input("Enter your height in meters: "))
11
if name == " main ":
main()
➢ The interpret_bmi function takes the BMI value as input and returns an interpretation based
on common BMI categories. These categories are "Underweight" (BMI < 18.5), "Normal
weight" (18.5 <= BMI < 25), "Overweight" (25 <= BMI < 30), and "Obese" (BMI >= 30).
➢ The main function is where the user interacts with the program. It prompts the user to enter
their weight and height, then calculates the BMI using the calculate_bmi function and
interprets it using the interpret_bmi function. Finally, it prints out the calculated BMI and
its interpretation.
➢ The if name == " main ": block ensures that the main function is only executed if
the script is run directly (not imported as a module).
➢ This code allows users to input their weight and height, and then it calculates their BMI and
provides an interpretation of the BMI value according to standard categories.
12
CHAPTER 4. RESULTS ANALYSIS AND VALIDATION
Fig 4.3
BMI Calculator
• US Units
13
• Metric Units
• Other Units
20
Age ages: 2 - 120
Gender Male Female
Height 5 7
feet inches
124
Weight pounds
Calculate
Result
BMI = 19.4 kg/m2 (20%, Healthy weight)
5%85%95%BMI = 19.4
The Body Mass Index (BMI) Calculator can be used to calculate BMI value and
corresponding weight status while taking age into consideration. Use the "Metric Units" tab
for the International System of Units or the "Other Units" tab to convert units into either US or
metric units. Note that the calculator also computes the Ponderal Index in addition to BMI,
both of which are discussed below in detail.
14
15
CHAPTER 5. CONCLUSION AND FUTURE WORK
5.1 Conclusion:
weight and height inputs. It follows a straightforward logic: calculate BMI using weight and height inputs, then
interpret the BMI value based on common categories such as underweight, normal weight, overweight, and obese.
Users can easily understand their BMI status and get an idea of whether they fall within a healthy weight range or if
they need to consider lifestyle changes.
The provided BMI calculator is a simple and effective tool for users to quickly determine their BMI based on their
1. Enhanced User Interface: Incorporating a graphical user interface (GUI) could make the
calculator more user-friendly, especially for individuals less familiar with command-line
interfaces.
2. Extended BMI Categories: While the current calculator covers basic BMI categories,
future versions could incorporate more detailed categories or provide additional health-
related information based on the calculated BMI.
3. Integration with Health Data: Integration with health data from wearable devices or
fitness apps could provide more personalized insights and recommendations for users.
4. Localization: Consideration for different units of measurement and regional BMI
standards could improve the calculator's usability for a global audience.
5. Error Handling and Validation: Implementing robust error handling and input validation
mechanisms can enhance the calculator's reliability and prevent unexpected behavior
when users input invalid data.
6. Incorporating Health Recommendations: Providing personalized health
recommendations based on BMI status, such as diet and exercise suggestions, could
further assist users in maintaining or improving their health.
7. Tracking and Monitoring: Adding features for tracking BMI changes over time and
setting goals could encourage users to monitor their progress and stay motivated
towards achieving a healthier BMI.
By incorporating these enhancements, the BMI calculator can evolve into a more
comprehensive tool for promoting health awareness and facilitating informed decisions
about lifestyle and wellness.
16
REFERENCES
(1) https://chat.openai.com/c/29b31a7e-41b0-4dac-b2af-e46f90aeae97
(2) https://www.calculator.net/bmi-
calculator.html?cage=20&csex=f&cheightfeet=5&cheightinch=7&cpound=124&c
heightmeter=180&ckg=65&printit=0&ctype=standard&x=Calculate
(3) https://colab.research.google.com/
(4) https://ieeexplore.ieee.org/document/10112962
17
18