#a bmi converter
a = input("What is your mass unit,type'kg'or'lb' : ")
ax = float(input("enter mass"))
b = input("What is your height unit,type'ft'or'cm' : ")
bx = float(input("enter height"))
if a == "lb":
ax=ax*0.453592
elif a == "kg":
ax=ax
else:
print("invalid input")
if b == "ft":
bx=bx*30.48
elif b == "cm":
bx=bx*0.01
else:
print("invalid input")
bmi = ax/(bx**2)
w=int
if bmi <18.5:
w="underweight"
elif bmi==range(18.5,24.9):
w="normal weight"
elif bmi==range(25,29.9):
w="overweight"
elif bmi>30:
w="obese"
print ("your bmi is",bmi,w)
Which gives the following error:
TypeError: 'float' object cannot be interpreted as an integer
So i need the range in decimals
but it doesnt accept int values