Answered step by step
Verified Expert Solution
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
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 outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started