top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Writing Simple Apps with Python: BMI Calculator

Writer: Md Ali Mortaza SouravMd Ali Mortaza Sourav

Body mass index is a measurement related to body weight and height. BMI is sometimes used to measure total body fat and whether a person has a healthy weight. Excess body fat increases the risk of certain diseases, including heart disease and some cancers. Also called body mass index.

First, we start with asking the user to introduce his height and weight. To do this we use the input() function. We convert the string input to float so we can do the calculations.

Next, we calculate the BMI and show the result. The formula for the BMI is BMI = kg/m2 where kg is a person's weight in kilograms and m2 is their height in meters squared. We divided the height by 100 to convert it into meters.

Here we used f-strings to directly place the variable within the print statement.

Now, we interpret the health status based on our calculated output.

Output

We are done. To find the code click here.

 
 

Comentarios


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