This is python code right

def input_int(promt):
    ret = int(input(promt))
    return ret

def input_float(promt):
    ret = float(input(promt))
    return ret


weight = input_float("Enter your weight (in kgs)\n")
height_unit = input("What is your preferred unit of height? Type 'f' for feet and 'm' for meters\n")

if height_unit == "f":
    feet = input_int("You will enter your height given as feet and inches. First enter feet\n")
    inches = input_int("Now enter inches\n")
    meter = (feet + inches/12) * 0.3048

if height_unit == "m":
    meter = input_float("What is your height in meters\n")

print("your height is ", meter, "meter", "and weight is ", weight, "Kg")
BMI = weight/meter**2
print("your BMI is ",BMI)

if BMI < 18.5:
    print(" you are UNDERWEIGHT")
elif BMI < 25:
    print("you are NORMAL")
elif BMI < 30: 
    print("you are OVERWEIGHT")
else:
    print("you are VERY-OVERWEIGHT")

So what’s your question? :slight_smile:

2 Likes