Advertisement
makispaiktis

Calculate BMI - Codewars

Nov 24th, 2019 (edited)
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. def bmi(weight, height):
  2.     BMI =  weight / height / height
  3.     if BMI <= 18.5:
  4.         return "Underweight"
  5.     elif BMI <= 25:
  6.         return "Normal"
  7.     elif BMI <= 30:
  8.         return "Overweight"
  9.     elif BMI > 30:
  10.         return "Obese"
  11.  
  12. # MAIN FUNCTION
  13. print(bmi(50, 1.92))
  14. print(bmi(62, 1.82))
  15. print(bmi(82, 1.78))
  16. print(bmi(92, 1.72))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement