0% found this document useful (0 votes)
5 views25 pages

IP Final Project 1

Ip project on revenue

Uploaded by

anuragpatel0069
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views25 pages

IP Final Project 1

Ip project on revenue

Uploaded by

anuragpatel0069
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

BMI MANAGEMENT

SYSTEM
A BMI Management System is a tool or process designed to monitor,
evaluate, and guide individuals in maintaining a healthy Body Mass Index
(BMI). BMI is a measure that uses a person's weight and height to estimate
whether their body weight falls within a healthy range. The system can be
used by individuals, health professionals, or organizations to promote
better health and fitness outcomes.

Key Components of a BMI Management System:

1. Data Collection:

Users input personal information such as weight, height, age, and gender.

2. BMI Calculation:

BMI is calculated using the formula:BMI = Weight (kg) ÷


[Height (m)]²
3. Categorization:

Based on the calculated BMI, the system categorizes the individual into
different health ranges:

RANGE MEN WOME


N
Underweight Less than 20 Less than 19
Healthy 20 to 25 19 to 24
Overweight 26 to 30 25 to 30
Obese More than 30 More than 30

4. Analysis and Insights:The system provides feedback about the health


implications of the individual's BMI and suggests possible actions.

5. Health and Lifestyle Recommendations:For Underweight:


Recommend a calorie-rich diet, strength-building exercises, and medical
evaluation if needed.

For Normal Weight: Encourage maintaining current habits with balanced


diet and regular physical activity.

For Overweight/Obesity: Advise weight management strategies such as a


balanced low-calorie diet, increased physical activity, and regular health
check-ups.

6. Progress Monitoring:
Regular tracking of BMI changes over time to assess progress and refine
strategies.

Importance of a BMI Management System:

Promotes Health Awareness: Educates users about their current health


status.

Prevention of Health Risks: Helps prevent diseases related to abnormal BMI,


like diabetes, cardiovascular issues, and obesity.

Personalized Approach: Offers tailored advice based on individual BMI.

Encourages Healthy Habits: Motivates individuals to adopt sustainable


lifestyle changes.

A BMI Management System can be implemented manually or through apps


and devices that automate calculations and provide comprehensive health
insights.

PYTHON
Python is a versatile, high-level, and interpreted programming language
that is widely used for various applications, from web development to data
science and artificial intelligence. Created by Guido van Rossum in 1991,
Python is known for its simplicity, readability, and extensive libraries,
making it one of the most popular programming languages in the world.
Key Features of Python:
1. Easy to Learn and Use: Python has a simple and intuitive syntax that
resembles natural language, making it beginner-friendly
2. Interpreted Language: Python does not need to be compiled; instead,
it is executed line by line, allowing for quick debugging and testing.
3. Open-Source: Python is free to use, distribute, and modify, supported
by a large global community
4. Versatile: Python supports multiple programming paradigms,
including:

Object-Oriented Programming (OOP)

Functional Programming

Procedural Programming

5. Extensive Library Support: Python has a vast standard library and


third-party libraries for various domains like web development
(Django, Flask), data science (NumPy, Pandas, Matplotlib), and AI/ML
(Tensor Flow, PyTorch).
6. Cross-Platform: Python can run on different operating systems like
Windows, macOS, and Linux without modifications.

Applications of Python:
1. Web Development: Frameworks like Django and Flask are used to
create robust and scalable web applications.
2. Data Science and Analytics: Python is a favorite among data
scientists due to libraries like Pandas, NumPy, and Matplotlib.
3. Machine Learning and AI: Tools like TensorFlow and PyTorch help build
intelligent systems and predictive models.
4. Automation: Python is widely used for scripting and automating
repetitive tasks.
5. Game Development: Libraries like Pygame allow for simple game
development
6. Cybersecurity: Python helps in building tools for ethical hacking,
penetration testing, and network analysis.
MYSQL
Introduction to MySQL
MySQL is an open-source, relational database management system
(RDBMS) that is widely used for storing, managing, and retrieving
structured data. It was developed by MySQL AB in 1995 and is now
maintained by Oracle Corporation. MySQL is renowned for its reliability,
speed, and ease of use, making it a preferred choice for both small-scale
and large-scale applications

Key Features of MySQL:


1. Open-Source: MySQL is free to use and modify, though commercial
versions with additional features are also available.

2. Relational Database: Data is organized into tables, and relationships


between tables are established through foreign keys.

3. High Performance: Optimized for fast query processing, MySQL


supports large datasets and complex queries efficiently.

4. Cross-Platform Compatibility :MySQL can run on various operating


systems, including Windows, Linux, and macOS.

5. Scalability: Suitable for both small applications and large, enterprise-


level systems.

6. Security: MySQL includes robust security features, such as user


authentication, encryption, and access controls.

7. Multi-User Support: Allows multiple users to access and manage the


database concurrently.

8. Support for Standard Query Language (SQL):MySQL uses SQL for


querying, updating, and managing data.

9. Integration: Easily integrates with programming languages like PHP,


Python, Java, and frameworks like Django and Laravel

Applications of MySQL:

1. Web Development: MySQL is often used in combination with PHP and


Apache in web development stacks like LAMP (Linux, Apache, MySQL, PHP).

2. Data Warehousing: MySQL can handle data analytics and business


intelligence tasks.
3. eCommerce: Platforms like Magento and WooCommerce use MySQL to
manage product data, transactions, and customer information.

4. Content Management Systems (CMS): Popular CMSs like WordPress,


Joomla, and Drupal rely on MySQL for database management.

5. Online Applications: Social media platforms, forums, and subscription-


based services use MySQL for user management and data storage.

Benefits of MySQL:
User-Friendly: Easy to learn and use, even for beginners.

Cost-Effective: Open-source nature makes it ideal for startups and small


businesses.

Reliable and Stable: Used by many large-scale applications and


organizations.

Wide Community Support: Extensive documentation and active forums help


users resolve issues quickly.

PANDAS LIBRARY
Pandas is a Python library used for data manipulation, analysis, and
cleaning. It provides efficient data structures and operations for working
with structured data, such as tables or time-series data. It is widely used in
data science and machine learning projects.

Key Commonly Features of Pandas:


1. Data Structures:Series: One-dimensional labeled array.
DataFrame: Two-dimensional labeled data structure (like a spreadsheet or
SQL table).

2. Data Manipulation:Handling missing data.Merging, joining,


andreshaping datasets.Sorting and filtering data.
3. Data Analysis:Aggregation and statistical operations.Grouping
data for summarization.
4. Integration: Works seamlessly with NumPy, Matplotlib, and other
libraries.

MATPLOTLIB
Matplotlib is a Python library used for data visualization. It provides
tools to create a variety of static, interactive, and animated plots.

Key Points:

1. Used Module: matplotlib.pyplot (similar to MATLAB’s plotting


functions).
2. Types of Plots:

Line plots

Scatter plots

Bar charts

Histograms

Pie charts

3D plots

3. Customizations: Modify titles, labels, colors, legends, and more.


4. Integration: Works well with libraries like NumPy and Pandas.

NUMPY LIBRARY

NumPy (Numerical Python) is a powerful Python library used for


numerical computations. It is the foundation for many data science and
machine learning libraries.

Key Features:
1. N-dimensional Arrays: Provides the ndarray object for efficient storage
and manipulation of large datasets.

2. Mathematical Operations: Supports vectorized operations (addition,


subtraction, multiplication, etc.) for fast computation.

3. Built-in Functions: Mathematical, statistical, and linear algebra


functions.

4. Integration: Works seamlessly with libraries like Pandas, Matplotlib,


and SciPy.

CODE FOR PROGRAM


Import pandas as pd
Import numpy as np
Import matplotlib.pyplot as plt
From tabulate import tabulate
While True:
Username=input(“Enter User Name : “)
Password=input(“\nEnter Password : “)
If username == “bmi” and password== “12345”:
Print(“\nWelcome to Body Mass Index System \n”)
Break
Else:
Print(“Invalid Username or Password”)

While True:
Print(‘\t\t *** Body Mass Index Project *** ‘)
Print(‘Body mass index (BMI) is a measure of body fat
based on height and weight that applies to adult men
and women. View the BMI tables or use the tool below to
compute yours.Enter your weight and height using
standard or metric measures ‘)
Print(‘\n\t\t\t1. Data Analysis’)
Print(‘\n\t\t\t2. Data Visualization’)
Print(‘\n\t\t\t3. Data Operations’)
Print(‘\n\t\t\t4. Exit\n’)

Choice=int(input(‘Select your Choice [1-4] : ‘))

If choice==1:
While True:
Print(‘\t*** BODY MASS INDEX SYSTEM ***\n’)
Print(‘*’*50)
Print(“\n\t\t1. Show BMI Data”)
Print(“\n\t\t2. Show Name Wise-Data”)
Print(‘\n\t\t3. Show first nth record’)
Print(“\n\t\t4. Show last nth records”)
Print(“\n\t\t5. Display the Names Who are
UNDER WEIGHT”)
Print(‘\n\t\t6. Display the Names Who are
OVER WEIGHT’)
Print(“\n\t\t7. For Exit the program\n\n”)
Choice = int(input(“Enter Your Choice [1-7] :
“))
If choice == 1:
Print(“\nEmployees Data :\n\n”)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
Print(tabulate(df,showindex=False,header
s=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’preety’))
Elif choice == 2:
Print(“\nData Name- Wise Data :\n”)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’,usecols = [‘Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max Value’,’Remark’])
Df = df.sort_values(by=’Name’)
Print(tabulate(df,showindex=False,header
s=[‘Name’,’Age’,’Height in meter’,’Weight in
KG’,’BMI’,’Standard Min Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Elif choice == 3:
Print(“\nFirst N Rows \n”)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
Df = df.sort_values(by=’Name’)
Nth = int(input(“How many rows to
display? : “))
Print(tabulate(df.head(nth),showindex=Fal
se,headers=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Elif choice == 4:
Print(“\nLast N Rows \n”)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
Df = df.sort_values(by=’Name’)
Nth = int(input(“How many rows to
display? : “))
Print(tabulate(df.tail(nth),showindex=Fals
e,headers=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Elif choice == 5:
Print(“\nNames Who are Under Weight :\
n”)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
Mask = df.loc[df[‘Remark’] == ‘Under
Weight’]
#underweight=df[mask]
Print(tabulate(mask,showindex=False,hea
ders=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Elif choice==6:
Print(“\nNames Who are Over Weight :\n”)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
Mask = df.loc[df[‘Remark’] ==’Over
Weight’ ]
Print(tabulate(mask,showindex=False,hea
ders=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Elif choice==7:
Print(‘Exit to main menu…………’)
Break
Else:
Print(‘Invalid Choice, Retry 1/2/3/4/5/6/7’)
Elif choice==2:
While True:
Print(‘Data Visualization’)
Print(‘\n\t1. Plot Line Chart (Name and Base
MASS Index’)
Print(‘\n\t2. Plot Bar Chart Vertical (Name and
BMI)’)
Print(‘\n\t3. Plot Bar Horizontal Chart (Name
and BMI)’)
Print(‘\n\t4. Plot Histogram (Name and BMI y)’)
Print(‘\n\t5. Exit\n’)
Choic=int(input(‘Select your Choice [1-4] : ‘))
If choic==1:
Print(‘Line Chart’)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)

NAME=df[“Name”]
BMI=df[“BMI”]

Plt.ylabel(“Base Mass Index ---------”)


Plt.xlabel(“Name ------”)

Plt.title(“*** Name and Base Mass Index


***”)

Plt.plot(NAME,BMI, color=’r’)
Plt.grid()
Plt.savefig(‘bmi_line.pdf’)
Plt.show()

Elif choic==2:
Print(‘Bar Chart’)

Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
NAME=df[“Name”]
BMI=df[“BMI”]
Plt.ylabel(“BMI”)

Plt.title(“*** Name and BMI Graph ***”)

Plt.bar(NAME,BMI, color=’r’)
Plt.grid()
Plt.savefig(‘bmi_bar.pdf’)
Plt.show()
Elif choic==3:
Print(‘Bar Chart’)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)

NAME=df[“Name”]
BMI=df[“BMI”]

Plt.xlabel(“BASE MASS Index”)


Plt.title(“Name and BMI Graph”)
Plt.barh(NAME,BMI, color=’r’)
Plt.grid()
Plt.savefig(‘bmi_barh.pdf’)
Plt.show()

Elif choic==4:
Print(‘Histogram’)
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
NAME=df[“Name”]
BMI=df[“BMI”]

Plt.title(“Name and BMI Histogram


Graph”)

Plt.hist(BMI, color=’r’)
Plt.grid()
Plt.savefig(‘bmi_hist.pdf’)
Plt.show()

Elif choic==5:
Print(‘Exit to main menu……..’)
Break
Else:
Print(‘Invalid choice’)
Elif choice==3:
While True:
Print(‘Data Operations’)
Print(‘\n\t1. Add a new record in BMI List’)
Print(‘\n\t2. Remove a existing record from
List’)
Print(‘\n\t3. Exit\n’)
Choic=int(input(‘Select your Choice [1-3] : ‘))

If choic==1:
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
NAME= input(‘Enter Name : ‘)
AADHARNO= input(‘Enter Aadhar
Number : ‘)
AGE = input(‘Enter Age : ‘)
WEIGHT= float(input(‘Enter Weight in
Kilograms(Kg) : ‘))
HEIGHT= float(input(‘Enter Height in
Meters : ‘))
BMI= WEIGHT/(HEIGHT*HEIGHT)
If(BMI<18.5): REMARK = “Under Weight”
Elif(BMI>24.9) : REMARK= “Over Weight”
Else: REMARK = “Standard Value”
Record=df[‘Name’].count()
Df1=pd.DataFrame({“Year”:2023,”Aadhar
No”:AADHARNO,”Name”:NAME,”Age”:AGE,”Height in
meter” : HEIGHT, “Weight in KG” : WEIGHT,
“BMI” : BMI , “Standard Min
Value” : 18.5, “Standard Max
Value”:24.9,”Remark”:REMARK}, index=[record])

Df=pd.concat([df,df1], ignore_index=True)

Print(tabulate(df,showindex=False,headers
=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Df.to_csv(‘F:\\projects\\IP_BMI\\bmi.csv’,
index=False)
Print(‘Record added Successfully…………..’)

Elif choic==2:
Df=pd.read_csv(‘F:\\projects\\IP_BMI\\
bmi.csv’)
Print(tabulate(df,showindex=False,headers
=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))

R=input(“Enter the Name to be removed :


“)
Df = df.drop(df[df[‘Name’] == r].index)
Print(tabulate(df,showindex=False,headers
=[‘Year’,’AadharNo’,’Name’,’Age’,’Height in
meter’,’Weight in KG’,’BMI’,’Standard Min
Value’,’Standard Max
Value’,’Remark’],tablefmt=’pretty’))
Df.to_csv(‘F:\\projects\\IP_BMI\\bmi.csv’,
index=False)
Print(‘Record deleted
Successfully…………..’)

Elif choic==3:
Print(‘Exit to main menu……..’)
Break
Else:
Print(‘Invalid choice’)
Elif choice==4:
Print(‘Exit from menu……..’)
Break
Else:
Print(‘Invalid choice’)

output

1. Data analysis
ops.
4. Exit

"Era-IT

Enter Your Choice (1-71 : 1

Year Age ght in n KG Standard Valu e R&ark

p Type to

Show BMI Data


• Show name wise data

Show first nth row

• Show last nth row


Display names who are UNDER
WEIGHT

:
EnterYourChoice(1-71 5

Display names who are OVER WEIGHT

2.Data visualization.

Plot line chart


*** Name and Base Mass Index ***
RadheRadhe
Name
Plot bar chart vertical
Nameand BMIGraph

Ram Sita Kanha r.•Ehit Raman RadheRadhe

Plot bar horizontal chart

Name and BMI Graph


Raman

Mohit

Gnha

Ram

dheRadhe 20 30
BASE MASS Index

Plot histogram

Name and BMI Histogram


Graph
2.00

1.75

1.50

1.25

1.00

0.75

0.50

0.25

0.00
Data operation
1

• Add new record in BMI list

Remove a existing record from list


Exit

You might also like