Question: Suppose that Yulin, another Data 8 student, is tasked with writing code to find the middle of three distinct numbers named a, b, and c.

Suppose that Yulin, another Data 8 student, is tasked with writing code to find the middle of three distinct numbers named a, b, and c. (By "middle" we mean the value that is neither the maximum nor the minimum.) For example, given the values 4, 2, and 7, the code should give back 4. Yulin has a moment of inspired thought and rapidly types the following into her Jupyter notebook: U a + b + c - max(a, b, c) + min(a, b, c) Is her code correct? Why or why not? If not, make a simple change to the cell above to fix it. Hint: Running the cell will produce an error because we haven't defined a, b, and c, but you're free to make any changes you want to test your ideas. (Please have just 1 line in the cell above in the notebook you submit, though.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
