Sep-05-2023, 03:25 PM
hi recently i started learning python my first project is BMI calculator after coding in (python 3.11) when i execute my code i get error saying float' object cannot be interpreted as an integer any help is much appreciated
my BMI coding:
my BMI coding:
weight = float(input('your weight in kg?:')) height = float(input ('your height in cm?:')) BMI = weight/(height/100)**2 print ('your BMI is', BMI) if BMI < 18.5: print ("under weight") if BMI > 25: print ("over weight") if BMI in range(18.5 , 24.9): print ("your BMI is IDEAL")thanks in advance