+ 1

Some explain why I keep getting an error at line 2

#your code goes here weight = double(input ()) height = double(input ()) BMI = weight / (height* height ) if BMI < 18.5 : print("Underweight") else : if BMI >= 18.5 or BMI < 25 : print ("Normal") else : if BMI >= 25 or BMI < 30 : print ("Overweight") else : if BMI >= 30 : print ("Obesity")

27th Dec 2022, 8:22 AM
Alex Wairegi
Alex Wairegi - avatar
4 Answers
+ 3
There is no double() function in python. It is float() in Python. Replace it. And I think, you need to think about logic again in indentation of if blocks, to get pass all tests...
27th Dec 2022, 8:41 AM
Jayakrishna šŸ‡®šŸ‡³
+ 2
**Read the error message**. What does it say? Python does not have a built-in double() function.
27th Dec 2022, 8:41 AM
Lisa
Lisa - avatar
+ 2
JayakrishnašŸ‡®šŸ‡³ I have seen it but I really can't seem to solve it can you give me a reference to somewhere I can get better understanding of indentation
27th Dec 2022, 10:13 AM
Alex Wairegi
Alex Wairegi - avatar
27th Dec 2022, 10:40 AM
Jayakrishna šŸ‡®šŸ‡³