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 by python

What is the BMI?

Body Mass Index (BMI) is a person’s weight in kilograms divided by the square of height in meters. A high BMI can indicate high body fatness. BMI screens for weight categories that may lead to health problems, but it does not diagnose the body fatness or health of an individual.


so in the program I start by taking the height and the weight from user :

w=float(input("Please Enter your Weight"))
h=float(input("Please Enter your Height"))
 

then I calculated the BMI :

BMI=w/(h/100)**2

 

then I converted the result from float to string to concatenate it print sentence:

bmi=str(BMI)
 

the program detect if person's BMI is normal is not so I used if Condition to print the BMI value and the Person status as shown:

if BMI <= 18.4:
print("Your BMI is" +bmi+"You are underweight.")
elif BMI <= 24.9:
print("Your BMI is" +bmi+"You are healthy.")
elif BMI <= 29.9:
print("Your BMI is" +bmi+" You are over weight.")
elif BMI <= 34.9:
print("Your BMI is" +bmi+" You are severely over weight.")
elif BMI <= 39.9:
print("Your BMI is" +bmi+" You are obese.")
else:
print("Your BMI is" +bmi+" You are severely obese.")
 

program code :

print("Welcome In BMI Calculator Program")
w=float(input("Please Enter your Weight"))
h=float(input("Please Enter your Height"))
BMI=w/(h/100)**2
bmi=str(BMI)
if BMI <= 18.4:
print("Your BMI is" +bmi+"You are underweight.")
elif BMI <= 24.9:
print("Your BMI is" +bmi+"You are healthy.")
elif BMI <= 29.9:
print("Your BMI is" +bmi+" You are over weight.")
elif BMI <= 34.9:
print("Your BMI is" +bmi+" You are severely over weight.")
elif BMI <= 39.9:
print("Your BMI is" +bmi+" You are obese.")
else:
print("Your BMI is" +bmi+" You are severely obese.")
 
 
 

Commenti


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