simple bmi calculator using python

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

showing results for - "simple bmi calculator using python"
Ethan
14 May 2019
1weight = float(input('What is your weight? (Kg) '))
2height = float(input('What is your height? (Mtr) '))
3bmi = weight/(height*height)
4
5if bmi <= 18.5:
6    print('Your BMI is', bmi, 'which means you are underweight')
7
8elif 18.5 < bmi < 25:
9    print('Your BMI is', bmi,'which means you are normal')
10
11elif 25 < bmi < 30:
12    print('your BMI is', bmi,' which means you are overweight')
13
14elif bmi > 30:
15    print('Your BMI is', bmi,'which means you are obese')
Serena
18 Feb 2017
1Hight = float(input("What is Your Hight in m:- "))
2weight = float(input("What is your weight in kg:- "))
3calculator = weight/Hight ** 2
4print(calculator)
Elizabeth
13 May 2020
1print("Welcome to BMI calculator, by Abthahi Tazrian.")
2
3# Offer Measurement Conversions
4
5Offer_Conversions = input("Would you like to convert your imperial units to metric? (yes / no): ")
6
7if Offer_Conversions == "yes":
8    Imperial_Weight = input("What is your weight in pounds?: ")
9    Imperial_Height = input("What is your height in feet (decimals)?: ")
10
11    Imperial_Weight = float(Imperial_Weight)
12    Imperial_Height = float(Imperial_Height)
13
14    Metric_Converted_Weight = Imperial_Weight * 2.205
15    Metric_Converted_Height = Imperial_Height * 30.48
16
17    Metric_Converted_Weight = str(Metric_Converted_Weight)
18    Metric_Converted_Height = str(Metric_Converted_Height)
19
20    print("Your metric weight is " + Metric_Converted_Weight + " kg, please note this for the next stage.")
21    print("Your metric height is " + Metric_Converted_Height + " cm, please note this for the next stage.")
22    print("--")
23elif Offer_Conversions == "no":
24    print("--")
25
26# Data Collection
27
28Age = input("Put in your age: ")
29Weight = input("Put in your weight in KG: ")
30Height = input("Put in your height in CM: ")
31
32# BMI Formula Calculation
33
34Weight = float(Weight)
35Height = float(Height)
36
37Height_Squared = Height * Height
38BMI_Formula_Assisted = Weight / Height_Squared
39BMI_Formula_Completed = BMI_Formula_Assisted * 10000
40
41# Health Chart Display
42
43BMI_Formula_Completed = str(BMI_Formula_Completed)
44
45print("You have a BMI score of " + BMI_Formula_Completed + ".")
46
47BMI_Formula_Completed = float(BMI_Formula_Completed)
48
49if BMI_Formula_Completed <= 18.5:
50    print("You are underweight, consider gaining weight to bring your BMI to between 20 and 25.")
51elif BMI_Formula_Completed <= 25:
52    print("You are perfectly healthy, with a BMI within a healthy range of between 20 and 25.")
53elif BMI_Formula_Completed <= 30:
54    print("You are overweight, speak to a doctor about setting yourself a new target BMI between 20 and 25.")
55elif BMI_Formula_Completed >= 30.1:
56    print("You are obese, you need to lower your BMI to between 20 and 25 or else you may be at risks.")
queries leading to this page
code for bmi calculator pythonhow to calculate bmi from weight and height in python pandashow to create bmi calculator in pythonhow to calculate bmi pythonsimple bmi calculator in pythoncalculator python codecalculate bmi python codehow to create a bmi calculator in pythonhow to caculate a bmi in pythonpython calculator codeb m i calculator in python bmi in pythoncalculation for bmi in pythontaking the input for calculating bmi python bmi calculator pythonhow to calculate bmi using phyotonbmi calculation in pythonbmi calculator code in pythonbmi calculator python codebmi calculator function in pythonpython bmi calculatorbmi python codebmi calculator in python using inputbmi formula for pythonprogram to calculate bmi pythonwrite a python program to calculate body mass index for a person hunt 3a weight 2f 28height 2a height 29advanced bmi calculator using pythonbody mass index calculator pythonhow to calculate bmi in pythonpython program for weight and heightbmi simple calculator code pythonbmi calculator python example cpdehow to make bmi calculator in pythoncalculate bmi in pythonpython bmi calculator codebmi calculator using pythonadvance bmi calculator using pythonbmi simple calculator code python html codeweight calculator in kg python scriptsbmi calculator in pythonbmi pythonsimple bmi calculator pythonbmi python programmingbmi calculator using python simpledef bmi calculator pythonimport bmi pythonpython program for bmi calculatorthonny letter weight calculatorbmi calculator function pythonpython bmi calculator using functionssimple bmi calculator using pythonhow to build a bmi calculator in pythonbmi calculator in python using defpython basic bmi in kilograms python bmi codecoding calculate bmi pythonhow to calculate bmi from weight and height in pythonpython program for bmi calculationcalculate bmi pythonpython calculate bmiwrite a program that calculates and displays a person 27s body mass index pythonbmi calculator program code in pythonbmi formula pythonwrite a program to find bmi of the patients using pythonpython bmibmi 3d height 2fweight to the power of 2 on pythonhow to calculator bmi in python codebmi python site 3amedium com site 3atowardsdatascience comdesign a body mass index 28bmi 29 program using python code bmi calculator pythonbmi calculator python sololearnbmi in pythonbmi calculator program in pythonhow to make a bmi calculator in pythonwrite a python program to calculate body mass index for a person hint 3a weight 2f 28height 2a height 29bmi calculator module pythonpython calculator programsimple bmi calculator using python