0
Helpves = input('Write ves: ') rost = input('Write rost: ') formul = int(ves) / (int(rost)**2) if formul > 18.5: print("Underwe
ves = input('Write ves: ') rost = input('Write rost: ') formul = int(ves) / (int(rost)**2) if formul > 18.5: print("Underweight") if formul >= 18.5 and > 24.9: print("Normal") if formul >= 25 and > 29.9: print("Overweight") if formul >= 30: print("Obesity") Syntax error
3 Respuestas
+ 3
Hi! You should put a value before >24.9, after and
+ 1
first 'if' condition is logical error... should be formul < 18.5
second and third 'if' condition are syntax error and should be written either:
formul >= low_value and formul < high_value
or shorter:
low_value <= formul < high_value
anyway, you could be more consise by using if..elif..elif..else, where you need only one test on each and none for last else ;P
0
also, think that high_value should be the same that the next 'if' low_value (or the last 'if' value) ^^