Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

BMI calculator in Python

height = float(input("Your height in metres: "))
weight = int(input("Your weight in kilograms: "))
bmi = round(weight / (height*height) , 1)
if bmi <= 18.5:
    print("Your BMI is" , bmi , "which means you are a bit underweight.")
elif bmi > 18.5 and bmi < 25:
    print("Your BMI is" , bmi , "which means you are fit and healthy.")
elif bmi > 25 and bmi < 30:
    print("Your BMI is" , bmi , "which means you are a bit overweight.")
elif bmi > 30:
    print("Your BMI is" , bmi , "which means you are a bit obese.")
else:
    print("Invalid Input.")
Comment

simple bmi calculator using 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)
Comment

calculator BMI python

# asking for input from the users  
the_height = float(input("Enter the height in cm: "))  
the_weight = float(input("Enter the weight in kg: "))  
# defining a function for BMI  
the_BMI = the_weight / (the_height/100)**2  
# printing the BMI  
print("Your Body Mass Index is", the_BMI)  
# using the if-elif-else conditions  
if the_BMI <= 18.5:  
    print("Oops! You are underweight.")  
elif the_BMI <= 24.9:  
    print("Awesome! You are healthy.")  
elif the_BMI <= 29.9:  
    the_print("Eee! You are over weight.")  
else:  
    print("Seesh! You are obese.")  
Comment

PREVIOUS NEXT
Code Example
Python :: 0 
Python :: np logical and 
Python :: big python code 
Python :: rest api save file python 
Python :: How to make colors.winapp in WindowsAP 
Python :: dft numpy amplitude 
Python :: linke dlists in python 
Python :: specifying random columns in numpy 
Python :: what is topic modelling in nlp 
Python :: HIDING AND ENCRYPTING USING BASE24 MODULE 
Python :: why does my function print none 
Python :: patoolib extract password-protected archives 
Python :: python not showing output 
Python :: wn.synset vs wn.synsets in nltk 
Python :: python print install directory 
Python :: Fill NaN with the first valid value starting from the rightmost column, then extract first column 
Python :: Python 0 evaluates to False 
Python :: empty show non python 
Python :: crank nicholson scheme python 
Python :: python arcade sound 
Python :: example of input int questions in python with if statement 
Python :: my name is raghuveer 
Python :: split dat file into datafram in python 
Python :: python - dataframe columns is a list - drop 
Python :: how to output index of list python without braquets 
Python :: sidetable github 
Python :: multiple categories on distploy 
Python :: radice n esima python 
Python :: randian angle to degrees using numpy 
Python :: dream manhunt 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =