0
Hey guys pls tell me where is the mistake in my code
weight=int(input()) height=int(input()) if float(weight/height**2)<18.5: print("Underweight") else: if float(weight/height**2)>=18.5 and <25: print("Normal") elif float(weight/height**2)>=25 and <30: print("Overweight") elif float(weight/height**2)>=30: print("Obesity")
2 Answers
+ 2
If you use the "and" operator, then you need to completely write the comparison condition.
Example:
if a > 0 and a < 5:
If you want to write a condition in an abbreviated form, then it will be the same as in mathematics:
if 0 < a < 5:
bug
else:
if... :
debug
elif:
+ 1
Aaah okey thank you ^^