top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

BMI project



A BMI Calculator will take in the height and weight of the individual and will calculate the BMI of the person.

Body mass index (BMI) is a measure of body fat based on height and weight.

Based on the BMI of the individual, it will print a statement stating the overall health of the person.

Let's start coding our project!

Let's Code

Alright, so the first thing we need to do is to ask the user their height & weight. This can be easily achieved through input() function

height = float(input("Enter your height in cm: "))weight = float(input("Enter your weight in kg: "))

We will convert the input string to float so that we can perform calculations with it.

Next up, we have to calculate the BMI.

The formula to calculate BMI is $weight (kg)/{height (m)}^2$. Let's implement this formula in python.

BMI = weight / (height/100)**2

Here we will be dividing the height by 100 to convert the centimetres into meters.

Now let's print out the BMI.

print(f"You BMI is {BMI}")

Now we have to print a statement to state the current health of the user based on their BMI

 
 
 

1 comentario


Data Insight
Data Insight
23 sept 2021

Check other articles to see how to write a blog post.

Me gusta

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