Question

In: Computer Science

Medical Calculator Create a python program that allows the user to enter the following patient information:...

Medical Calculator

Create a python program that allows the user to enter the following patient information:

  • First name and Last name
  • gender
  • age
  • weight
  • height
  • systolic pressure and diastolic pressure
  • current body temperature in degrees Fahrenheit

Once the information is entered then the results should be printed on the display based on the information below:

  • BMI
  • Temp Conversion
  • Mean Blood Pressure
  • Weight Conversion (lbs to kg)
  • Height Conversion (inches to cm)

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.

Solutions

Expert Solution

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))
  


Related Solutions

Create a Python program that: Allows the user to enter a phrase or sentence. The program...
Create a Python program that: Allows the user to enter a phrase or sentence. The program should then take the phrase or sentence entered Separate out the individual words entered Each individual word should then be added to a list After all of the words have been place in a list Sort the contents of the list Display the contents of the sorted list with each individual word displayed on a separate line Display a message to the user indicating...
Fat Percentage Calculator Create a C++ program that allows the user to enter the number of...
Fat Percentage Calculator Create a C++ program that allows the user to enter the number of calories and fat grams in a food. The application should display the percentage of the calories that come from fat. If the calories from fat are less than 30% of the total calories of the food, it should also display a message indicating the food is low in fat. One gram of fat has 9 calories, so: Calories from fat = fat grams *...
IN ANDROID STUDIO, you will create a mortgage calculator appthat allows the user to enter...
IN ANDROID STUDIO, you will create a mortgage calculator app that allows the user to enter a purchase price, down-payment amount, and an interest rate.Based on these values, the app should calculate the loan amount (purchase price minus down payment) and display the monthly payment for 10, 20, and 30-year loans.Allow the user to select a custom loan duration (in years) by using a SeekBar and display the monthly payment for that custom loan duration.Assignment deliverables (all in a ZIP...
Write a Python program that allows the user to enter the total rainfall for each of...
Write a Python program that allows the user to enter the total rainfall for each of 12 months into a LIST. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest rainfall amounts. Data: January 7.9 inches February 10.1 inches March 3.4 inches April 6.7 inches May 8.9 inches June 9.4 inches July 5.9 inches August 4.1 inches September 3.7 inches October 5.1 inches November 7.2...
How to do this in Python (using Lists): Create a python program that allows a user...
How to do this in Python (using Lists): Create a python program that allows a user to display, sort and update as needed a List of U.S States containing the State Capital and State Bird. You will need to embed the State data into your Python code. The user interface will allow the user to perform the following functions: 1. Display all U.S. States in Alphabetical order along with Capital and Bird 2. Search for a specific state and display...
In Python, write a program that allows the user to enter a number between 1-5 and...
In Python, write a program that allows the user to enter a number between 1-5 and returns the vitamins benefits based on what the user entered. The program should: Continue to run until the user quits and Validate the user’s input (the only acceptable input is 0, 1, 2, 3, 4, or 5), If the user enters zero “0” the program should terminate You can use the following facts: 1- Vitamin A protects eyes from night blindness and age-related decline...
In Python, write a program that allows the user to enter a number between 1-5 and...
In Python, write a program that allows the user to enter a number between 1-5 and returns the vitamins benefits based on what the user entered. The program should: Continue to run until the user quits and Validate the user’s input (the only acceptable input is 0, 1, 2, 3, 4, or 5), If the user enters zero “0” the program should terminate You can use the following facts: 1- Vitamin A protects eyes from night blindness and age-related decline...
USING PYTHON. Thank you in advance Write a program that allows the user to enter a...
USING PYTHON. Thank you in advance Write a program that allows the user to enter a series of string values into a list. When the user enters the string ‘done’, stop prompting for values. Once the user is done entering strings, create a new list containing a palindrome by combining the original list with the content of the original list in a reversed order. Sample interaction: Enter string: My Enter string: name Enter string: is Enter string: Sue Enter string:...
Time Calculator Create a C++ program that lets the user enter a number of seconds and...
Time Calculator Create a C++ program that lets the user enter a number of seconds and produces output according to the following criteria: • There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. • There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or...
Time Calculator ( PROGRAM VBA EXCEL) Create a application that lets the user enter a number...
Time Calculator ( PROGRAM VBA EXCEL) Create a application that lets the user enter a number of seconds and produces output according to the following criteria: There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT