“Code de calculatrice BMI dans Python” Réponses codées

Calculatrice IMC simple à l'aide de Python

Hight = float(input("What is Your Hight in m:- "))
weight = float(input("What is your weight in kg:- "))
calculator = weight/Hight ** 2
print(calculator)
Programmer of empires

Code de calculatrice BMI dans Python

h=float(input("Enter your height in meters: "))
w=float(input("Enter your Weight in Kg: "))
 
BMI=w/(h*h)
print("BMI Calculated is:  ",BMI)
 
if(BMI>0):
    if(BMI<=16):
        print("You are very underweight")
    elif(BMI<=18.5):
        print("You are underweight")
    elif(BMI<=25):
        print("Congrats! You are Healthy")
    elif(BMI<=30):
        print("You are overweight")
    else: 
        print("You are very overweight")
else:
    print("enter valid details")
Elaiza Reyes

Réponses similaires à “Code de calculatrice BMI dans Python”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code