0
Калькулятор имт
Помогите пожалуйста разобраться, что не так ves = int(input()) rost = float(input()) rez = ves / (rost**2) if rez < 18.5: print('Underweight') if rez >= 18.5 and rez < 25: print('Normal') if rez >= 25 and rez < 30: print('Overweight') if rez >= 30: print('Oops')
2 Answers
+ 3
Wrongly idented if blocks.. Just make it to use elif instead.
It's asked to print obesity, not oops for last case.
0
kg=int(input())
rost=float(input())
a= kg/(rost**2)
if a < 18.5:
print("Underweight")
elif a >= 18.5 and a < 25:
print("Normal")
elif a >= 25 and a < 30:
print("Overweight")
elif a >= 30:
print("Obesity")