Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
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 Respostas
+ 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!