Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve Instructions: 1. Use QU provided computers for answering this assignment. 2. Create a MS-Word document and save it in the Documents folder under

please solve image text in transcribed
Instructions: 1. Use QU provided computers for answering this assignment. 2. Create a MS-Word document and save it in the Documents folder under the name Answer_file. 3. Write your name and QUID at the top of the Answer file. 4. When you finish with the provided question, do the following: a. Copy the contents of the Python file that you developed and paste it under you name in the Answer file. b. Take a full sereen-shot of your computer screen, making sure that the whole program and the output windows are included in the screenshot. Paste your screenshot in the Answer_file, (below the Python program). c. Upload your Answer file using the provided In-labI link. The Body Mass Index, BMI for any person is obtained using the formula BMI=HelgheNess where the mass is measured in kilograms and the height is measured in meters. According to the value of the computed BMI, an individual is classified as underweight, healthy, overweight, or obese. These are decided as follows: - If BMI is less than 18.5, health status is Underweight. - If BMI is 18.5 to less than 25.0, health status is Healthy. - If BMI is 25.0 to less than 30.0, health status is Overweight. - If BMI is 30.0 or higher, health status is Obese. Write a Python program that does the following: 1. Prompt the user to enter the mass (in kg ), which is a floating-point number. 2. Prompt the user to enter the height (in meters), which is a floating-point number. 3. If mass is less than 10 or larger than 200 , then set mass =50.0 4. If height is less than 0.5 or larger than 2.25, then set height =1.5 5. Compute the body mass index using the formula given above. 6. Using an iffelif/else control structure and the BMI ranges given above, assign the correct BMI description for the user in a variable called health_status. (Hint: do not use a print statement in the iffeliffelse control structure). 7. Using f-strings, produce two output lines: the first displays the user's data and the second displays the BMI value and the health status. Format the two lines as shown below: User data: Mass =72.7 and Height =1.78

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions