top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

BMI calculator using python

Writer's picture: 074bex435.ranjan074bex435.ranjan

Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. It is a measure for the healthiness of the body in terms of physical body calculation. Furthermore, it also clarify about the obesity.


First, we require the height and weight of the person. Here we have input the height and weight in python and convert it into number.


#take height in feet and inches format as input from user
print('Enter your height in feet and inches')
print('Feet=')
feet = float(input())
print('Inches=')
inches = float(input())
height = feet*12+inches
# Take weight as input in pound
print('Enter your weight in pounds')
print('Weight = ')
weight = float(input())

Then we calculate the bmi using formula.

#Calculate BMI using formula
bmi = (weight/(height*height))*703
print('Your BMI is ',round(bmi,2))

Finally we also show the remarks according to the output of bmi.

#Check for under, normal, over weight or obesity
if bmi<=18.5:
    print('Underweight')
elif bmi>18.5 and bmi<=24.9:
    print('Normal weight')
elif bmi>=25 and bmi>=29.9:
    print('Over weight')
else:
    print('Obesity')

Github: https://github.com/ranjan435/data-insight-2021/blob/main/bmi.ipynb

 
 

1 comentário


Data Insight
Data Insight
19 de set. de 2021

Do not insert codes as images. Use the code snippet functionality.

Curtir

COURSES, PROGRAMS & CERTIFICATIONS

 

Advanced Business Analytics Specialization

Applied Data Science with Python (University of Michigan)

Data Analyst Professional Certificate (IBM)

Data Science Professional Certificate (IBM)

Data Science Specialization (John Hopkins University)

Data Science with Python Certification Training 

Data Scientist Career Path

Data Scientist Nano Degree Program

Data Scientist Program

Deep Learning Specialization

Machine Learning Course (Andrew Ng @ Stanford)

Machine Learning, Data Science and Deep Learning

Machine Learning Specialization (University of Washington)

Master Python for Data Science

Mathematics for Machine Learning (Imperial College London)

Programming with Python

Python for Everybody Specialization (University of Michigan)

Python Machine Learning Certification Training

Reinforcement Learning Specialization (University of Alberta)

Join our mailing list

Data Insight participates in affiliate programs and may sometimes get a commission through purchases made through our links without any additional cost to our visitors.

bottom of page