Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Code: Homework 6 about Functions: Write a function that receives three parameters: name, weight, and height. The default value for name is James. The

image text in transcribed

Python Code:

Homework 6 about Functions: Write a function that receives three parameters: name, weight, and height. The default value for name is James. The function calculates the BMI and returns it. BMI is: weight/(height 2 ). Weight should be in kg and height should be in meters. For instance, if the weight is 60kg and the height is 1.7m, then the BMI should be 20.76. The function should print the name and BMI. The function should return 'BMI is greater than 22 ' if the MBI is greater than or equal to 22. Otherwise, the function should return 'BMI is less than 22 '. Call the function and print its output

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_2

Step: 3

blur-text-image_3

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

Have I incorporated my research into my outline effectively?

Answered: 1 week ago