advanced bmi calculator using python

Solutions on MaxInterview for advanced bmi calculator using python by the best coders in the world

showing results for - "advanced bmi calculator using python"
Liana
02 Feb 2018
1User_height = float(input("Enter your height in cm: "))
2User_weight = float(input("Enter your weight in kg: "))
3BMI = User_weight / (User_height/100)**2
4print(f"You BMI is {BMI}")
5if BMI <= 18.4:
6    print("You are underweight.")
7elif BMI <= 24.9:
8    print("You are healthy.")
9elif BMI <= 29.9:
10    print("You are over weight.")
11elif BMI <= 34.9:
12    print("You are severely over weight.")
13elif BMI <= 39.9:
14    print("You are obese.")
15else:
16    print("You are severely obese.")
17    
Coralie
16 Oct 2018
1Hight = float(input("What is Your Hight in m:- "))
2weight = float(input("What is your weight in kg:- "))
3calculator = weight/Hight ** 2
4print(calculator)