0
BMI calculator
there is a problem with my code- can somebody take a look at it? HERE IT IS đđ»đđ»đđ» weight = int(input()) height = int(input()) wh = (weight/height) while True: if wh < 18.5: print ("Underweight") while True: if wh >= 18.5: if wh < 25: print ("Normal") while True: if wh >= 25: if wh < 30: print ("Overweight") while True: if wh >= 30: print ("Obesity")
2 RĂ©ponses
+ 5
hi KimWooBin Lover
mass = int(input())
hi = float(input())
//use this formula for bmi...
x = mass/hi**2
and remove all the while True loops
and then it should work
0
#your code goes here
weight = float(input())
height = float(input())
bmi = weight / (height ** 2)
if bmi < 18.5:
print('Underweight')
elif bmi >= 18.5 and bmi < 25:
print('Normal')
elif bmi >= 25 and bmi < 30:
print('Overweight')
elif bmi >= 30:
print('Obesity')
Copy and paste my answer
If it is right please vote for me