Question: PYTHON CODE Create your own function that calculate the maximum and minimum of two numbers. Then compare the results with Python's built-in functions max() and

PYTHON CODE PYTHON CODE Create your own function that calculate the maximum and minimum

Create your own function that calculate the maximum and minimum of two numbers. Then compare the results with Python's built-in functions max() and min(). 1. Define a function called own_max () which calculates the maximum of the integers a and b. It is possible to calculate without if with this formula: a + b + a - bl 2 (la -b means the absolute value of a - b) The function should return an integer. 2. Define a function called own_min () which calculates the maximum of the integers a and b according to the formula: a+b - la bl 2 The function should return an integer. 3. Ask the user for two numbers and then print out the result of own_max ( ), max ( ), own_min (), min () on the numbers. Leave a blank line after the input and between the maximum and minimum result. CODE SHOULD PRINT OUT LIKE THIS: Number 1: 39 Number 2: 14 own_max (39, 14) = 39 max (39, 14) = 39 own min (39, 14) = 14 min (39, 14) 14

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!