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: Lucien Dikla NgueleoLucien Dikla Ngueleo

The body mass index (BMI) estimates ideal weight based on height. Its calculation is the weight divided by the square of the height (BMI = weight in kg/height² in m)


def bmc(weight,height):
  '''
  bmc calcul the body masse index

  Parameters
  ---------- 
    (weight) person's weight in kg
    (height) person's height in m

  Returns
  ----------
    bmc = weight/height**2
  '''
  return weight/height**2

Example of using the bmc function


print(bmc(50,1.73))
16.70620468441979

Important concepts

def is the keyword to define a function

return is a special statement to return the result of the function to the caller

/ and ** are respectively division and power operators

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