Question: 3.18 LAB: Max magnitude Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in a program



3.18 LAB: Max magnitude Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in a program that takes two integer inputs, and outputs the largest magnitude value. Ex: If the inputs are: JUT the function returns: 7 Ex: If the inputs are: - 8 - 2 the function returns: -8 Note: The function does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the built-in absolute value function to determine the max magnitude, but you must still output the input number (Ex: Output -8, not 8). Your program must define and call the following function: def max_magnitude (user_vall, user_val2)import math "' Define your function here. if _name_ == "' Type your code here. D l d Run your program as often as you'd like. before submitting for grading. Below, type any needed eve op mo e u ml mo e input values in the rst box, then click Run program and observe the program's output in the second box. Enter program input (optional) If your code requires input values, provide them here. lnput(from above) } (Vomiggyam) } Output (shown below) Program output displayed here Signature of your work What is this? History of your effort will appear here once you begin working on this zyLab. Feedback
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
