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 :: print out session information django 
Python :: django customize the user model 
Python :: turtle example 
Python :: run python command 
Python :: exponent in python 
Python :: numpy concatenation python 
Python :: delete last few items from a list python 
Python :: matplot lib 3d plot autoscale 
Python :: opening files in python 
Python :: python temporary file 
Python :: how to call a python script from another python script 
Python :: Genisim python 
Python :: python write into file at position 
Python :: python find center of polygon function 
Python :: how ro have a incresing variable in python 
Python :: python typecast 
Python :: openpyxl get value from readonly cell 
Python :: beautifulsoup getting data from a website 
Python :: array sort python 
Python :: django login 
Python :: continue python 
Python :: pandas df by row index 
Python :: python tkinter button image 
Python :: repr() in python 
Python :: python list all columns in dataframe 
Python :: add gaussian noise python 
Python :: math module sin() function in python 
Python :: .first() in django 
Python :: google assistant in windows 10 
Python :: Customize color stacked bar chart matplotlib 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =