Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON LANGUAGE In Lab 2, you wrote a script that computed bmi risk. Convert that code to a function called bmiRisk that takes two parameters

PYTHON LANGUAGE In Lab 2, you wrote a script that computed bmi risk. Convert that code to a function called bmiRisk that takes two parameters bmi and age (in that order) and returns the string High, Medium, Low based on the table below.

Under 45

45 or over

BMI less than 22

Low

Medium

BMI 22 or more

Medium

High

Age= float(input("how old are you?")) BMI=float(input("what is your body mass index?")) if Age>=45 and BMI<=22: print("Medium") elif Age>=45 and BMI>=22: print("High") elif Age<=45 and BMI<=22: print("Low") elif Age<=45 and BMI>=22: print("Medium")

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

What is meant by planning or define planning?

Answered: 1 week ago

Question

Define span of management or define span of control ?

Answered: 1 week ago

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago