Python BMI Calculator Syntax Error & Code Not Running Equation
Question:
I still don’t know what I am doing wrong? Why won’t it take my named variables and square height and take the other and divide it by the square of the height?
Why is it indicating that the error is the name of the variable?
Answers:
You forgor to close a bracket on line 2
This is a simple fix on line 2 replace
Height = float(input("Enter weight in meters")
To
Height = float(input("Enter height in meters"))
As far as I can tell you just needed an extra bracket.
Hope this helps!
I still don’t know what I am doing wrong? Why won’t it take my named variables and square height and take the other and divide it by the square of the height?
Why is it indicating that the error is the name of the variable?
You forgor to close a bracket on line 2
This is a simple fix on line 2 replace
Height = float(input("Enter weight in meters")
To
Height = float(input("Enter height in meters"))
As far as I can tell you just needed an extra bracket.
Hope this helps!