Advertisement
JkSoftware

Day 3 - BMI Calculator 2.0

Nov 5th, 2021
904
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  Don't change the code below
  2. height = input("enter your height in cm: ")
  3. weight = input("enter your weight in kg: ")
  4. #  Don't change the code above
  5.  
  6. #Write your code below this line
  7. kgs = float(weight)
  8. cms = float(height)
  9.  
  10. bmi = (kgs / cms / cms) * 10000
  11. bmi = round(bmi, 1)
  12. if bmi <= 18.5:
  13.     print(f"Your BMI is: {bmi} You are underweight")
  14. elif bmi <= 25:
  15.     print(f"Your BMI is: {bmi} You are at a normal weight")
  16. elif bmi <= 30:
  17.     print(f"Your BMI is: {bmi} You are overweight")
  18. elif bmi <= 35:
  19.     print(f"Your BMI is: {bmi} You are obese")
  20. else:
  21.     print(f"Your BMI is: {bmi} You are clinically obese")
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement