0
Having trouble with BMI calculator math
Iâm getting an error for line 3: Type Error, but I canât find anything in the lessons that says floats canât be exponents? What am I missing? 1 w=input(int()) 2 h=input(float()) 3 bmi=(w/(h**2))
2 Answers
+ 4
Currently, your program is treating 'w' and 'h' variables as strings.
You need to first take the input and then convert it to float.
w = float(input())
+ 2
Thank you Sandeep!