Question: 1. Update this BMI program to show the weight status as follows: If the BMI result is less than 18.5, add a message that the

1.Update this BMI program to show the weight status as follows:

If the BMI result is less than 18.5, add a message that the patient is underweight

If the BMI result is equal to or greater than 18.5 and less than 25, print a message that the patient has a normal or healthy weight

If the BMI result is equal to or greater than 25 and less than 30, add a message that the patient is overweight

If the BMI result is equal to or greater than 30, add a message that the patient is obese

Here is a table of showing some example results you should be able to get:

BMI Should Give:
18.4

Underweight

18.5 Normal
24.9 Normal
25.0 Overweight
29.9 Overweight
30 and 50 Obease

Here is the program you need to copy and modify:

# BMI calculation pt_id = input("Enter the patient's name: ") weight = float(input("Enter the patient's weight in Kg: ")) height = float(input("Enter the patient's height in cm:")) bmi = weight/ (height / 100) ** 2 print( 'Patient ' + pt_id + ' with weight ' + str(weight) + ' kg' + ' and height ' + str(height) + ' cm' + ' has a Body Mass Index(BMI) of ' + str(bmi) )

Here is what I have so far, not sure how to change the if statement that would work for this code:

pt_id = input("Enter the patient's name: ") weight = float(input("Enter the patient's weight in Kg: ")) height = float(input("Enter the patient's height in cm:")) bmi = weight/ (height / 100) ** 2 print( 'Patient ' + pt_id + ' with weight ' + str(weight) + ' kg' + ' and height ' + str(height) + ' cm' + ' has a Body Mass Index(BMI) of ' + str(bmi) ) if bmi < 18.5: print("Patient", pt_id, "is underweight") else: if bmi >= 18.5: print("Patient", pt_id, "has a normal or health weight") else: if bmi < 25: print("Patient", pt_id, "has a normal or health weight") else: if bmi >= 25: print("Patient", pt_id, "is overweight") else: if bmi < 30: print("Patient", pt_id, "is overweight") else: if bmi >= 30: print("Patient", pt_id, "is obease") print("The program is completed, thank you!") 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!