In: Computer Science
Medical Calculator
Create a python program that allows the user to enter the following patient information:
Once the information is entered then the results should be printed on the display based on the information below:
Output should be in the following format:
First Name Last Name is ___ cm and ___ kg's. First Name Last Name has a BMI of ___ , a temperature of ___ degrees Celsius, and his or her Mean Blood pressure is ___ mmHG. Mr or Ms Last Name is considered ____ (from the government BMI standards) and he or she has low/normal/high blood pressure.
Hint: all conversion formulas, BMI standards, and what is considered hi/normal/low BP's can be found online. The output should address the user by using Mr or Mrs and he or she.
fName = input("Enter your First Name: ")
lName = input("Enter your Last Name: ")
gender = input("Enter your Gender: ")
age = int(input("Enter your Age: "))
weight = float(input("Enter your Weight in pounds: "))
height = float(input("Enter your height in inches: "))
sp = float(input("Enter your systolic pressure: "))
dp = float(input("Enter your diastolic pressure: "))
temp= float(input("Enter your current body temperature in degrees
Fahrenheit: "))
bmi = (703*weight)/(height)
temp = (temp-32)/(1.8)
bp = ((sp)+(2*dp))/3
weightKg = 0.45*weight
heightCM = height * 2.54
if (gender.upper()=="MALE"):
title = "Mr"
str="he"
str1="his"
elif (gender.upper()=="FEMALE"):
title="Mrs"
str="she"
str1="her"
if (bp>140):
resBP="High"
elif (bp<90):
resBP="Low"
else:
resBP="normal"
if(bmi<18):
resBMI="Underweight"
elif(bmi>24):
resBMI="OverWeight"
else:
resBMI="Healthy"
print()
print("%s %s is %.2f and %.2f kgs %s %s has a BMI of %.2f,
a"%(fName,lName,heightCM,weightKg,fName,lName,bmi))
print("temperature of %.2f degrees Celsius, and %s Mean Blood
pressure is %.2f mmHG. %s"%(temp,str1,bp,title))
print("%s is considered %s(from the government BMI standards) and
%s has"%(lName,resBMI,str))
print("%s blood pressure"%(resBP))

