Could you correct this? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Could you correct this?

Wether I put indentation or not before elif line, the result always indicates there is error somewhere and I can’t find any. Please help me. h=float(input()) w=float(input()) bmi=w/(h**2) if bmi<18.5 : print('Underweight') elif bmi<25 : print('Normal') elif bmi<30 : print('Overweight') else: print('Obesity')

14th Nov 2021, 6:17 AM
t029박현민
t029박현민 - avatar
2 Answers
14th Nov 2021, 6:32 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
t029박현민 w=float(input()) h=float(input()) Your inputs are in reversed order causing the incorrect numbers to be processed during the testing
14th Nov 2021, 9:09 AM
Rik Wittkopp
Rik Wittkopp - avatar