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 odpowiedzi
+ 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!