วันจันทร์ที่ 14 กันยายน พ.ศ. 2558

Lab 4x : Calculate of BMI

def setup():
   w = 40
   h = 160
   print("Weight = ",w)
   print("Hight  = ",h)
   print("Value of a BMI = ",bmi(w,h),"kg/cm*cm")
 
def bmi(w,h):
   divisor = h/100
   bmi = w/(divisor*divisor)
   return bmi

setup()

ไม่มีความคิดเห็น:

แสดงความคิดเห็น