top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Body Mass Index (BMI) Calculator

Writer's picture: James Owusu-AppiahJames Owusu-Appiah

Body Mass Index (BMI) Calculator

Body Mass Index is an approximate measure of whether someone is over or underweight, calculated by dividing their weight in kilograms by the square of their height in meters. BMI is an inexpensive and easy screening method for weight categories - underweight, healthy weight, overweight, and obesity. BMI does not measure body fat directly, but BMI is moderately correlated with more direct measures of body fat. Mathematically;

BMI = Weight (kg) / (Height (m) ^2).

#Taking the weight input of the individual
weight = float(input('Enter your weight in kilograms: '))

#Taking the height input of the individual
height = float(input('Enter your height in metres: '))

#Calculating the Body Mass Index (BMI)
BMI = weight/height**2

#Printing out the BMI value
print(f'Your BMI is {BMI} kg/m^2'.format(BMI))

This code takes the weight input of the individual in kilograms and converts it into a float value. It then takes the height input of the individual in meters and converts it into a float value. The BMI is then calculated and then later printed for the individual.


LINK TO GITHUB REPOSITORY WITH CODE:

0 comments

Recent Posts

See All

Comments


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