Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

continue the MPG calculator, but more. In this assignment you will practice the following in Python: o Defining and using functions o Using loop to

continue the MPG calculator, but more. In this assignment you will practice the following in Python: o Defining and using functions o Using loop to go through a list, do necessary processing o Handling errors o Finding out average and highest values

The background The background information is the same as in Assignment One (below). We will continue working on the BMI tracker. A persons BMI is calculated with the following formula: BMI=Weight*703/Height2 In the formula, weight is measured in pounds and height is measured in inches. BMI Level >=26 OW (overweight) >=19 OK

The Program 1. Rewrite the program to create a function that calculates BMI. The function takes in two parameters (weight and height) and returns BMI. 2. Create a second function that determine the level based on BMI. The function takes in one parameter (BMI) and returns corresponding level. 3. If the user enters incorrect input (non-numeric-looking input), your program should stop and provide an explanation. You can decide whether integer or float data type is appropriate. 4. We have a list of people. They are Max, Jack, and Joey. If you like you can make up your own list. Testing data are provided. We would like to go through the list, for each person, we enter information, calculate BMI, and display the level based on their BMI.

When outputting the BMI, you can choose to format it with 2 decimal points. Max Jack Mary weight 89 105 120 height 45 64 62 BMI About 30.9 About 18 About 22 Level OW UW OK

image text in transcribed

Python 3.8.10 (tags/v3.8.10:3d6993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AVD64)] Type "copyright", "credits" or "license" for more information. IPython 8.8.0-- An enhanced Interactive Python. In [1]

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

Why do unions strike? Do strikes always benefit workers?

Answered: 1 week ago

Question

Discuss the states of accounting

Answered: 1 week ago

Question

KEY QUESTION Refer to Figure 3.6, page

Answered: 1 week ago