BMI Calculator python code


print("######## Welcome to BMI calculator ########")time.sleep(1)
name = input("Please give me your name: \n")hieght = float(input("Enter your hieght in meters: \n"))weight = float(input("How much is your weight in Kg: \n"))
BMI = round(weight/(hieght * hieght),2)

def wait():
    print("Let me calculate your BMI. Hold tight.")
    print(". --> Calculating your BMI", name)
    print(".. --> Please wait", name)
    print(".. -->", name, "Just a second.")

def mainfunc():
    if (BMI < 18):
        print(name, "You are seriously underweight. Your condition is critical as your BMI score is ", BMI)
    elif (BMI >= 18 and BMI <= 18.5):
        print(name, "Your weight is average. Try some healthy diet. Your BMI score is ", BMI)
    elif (BMI > 18.5 and BMI <= 24.99):
        print(name, "You have healthy weight as your BMI score is ",BMI)
    elif (BMI > 24.99 and BMI < 30.00):
        print(name, "You are slightly  higher than required weight as your BMI score is ", BMI)
    elif (BMI >= 30):
        print(name, "!!! OVERWEIGHT !!! You seriously need to reduce your weight. Your BMI score is ", BMI)

Leave a Reply