fork download
  1. # your code goes here
  2. # your code goes here
  3. height = float(input("Enter your height in cm: "))
  4. weight = float(input("Enter your weight in kg: "))
  5.  
  6. BMI = weight / (height/100)**2
  7.  
  8.  
  9. print"Your BMI is", BMI
  10.  
  11. if BMI <= 18.4:
  12. print"You are underweight."
  13. elif BMI <= 24.9:
  14. print"You are healthy."
  15. elif BMI <= 29.9:
  16. print"You are over weight."
  17. elif BMI <= 34.9:
  18. print"You are severely over weight."
  19. elif BMI <= 39.9:
  20. print"You are obese."
  21. else:
  22. print"You are severely obese."
Success #stdin #stdout 0.02s 7468KB
stdin
162
53
stdout
Enter your height in cm: Enter your weight in kg: Your BMI is 20.1950922116
You are healthy.