Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function that has the following properties: Its name must be median It has three integer parameters named a, b, and c It is
Write a function that has the following properties:
- Its name must be median
- It has three integer parameters named a, b, and c
- It is assumed that the three values a, b, and c are all different. You don't need to check it in the function.
- The function returns the median of the three values. In this case, it would be the "middle" value. That is, neither the smallest nor the largest. For example, if a is 4, b is 2, and c is 7, the function returns the value in a, which is 4.
- The function increments a global variable named number_of_calls by 1, each time it is called. Initialize the global variable to 0.
Your code must not use any Python library functions.
Step 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