Question: Exercise 5 Step 1: Create a new editor window and save it. Use lab6ex5.py as the file name. Step 2: Use the function design recipe

 Exercise 5 Step 1: Create a new editor window and save

Exercise 5 Step 1: Create a new editor window and save it. Use lab6ex5.py as the file name. Step 2: Use the function design recipe to develop a function named big_diff. The function has one parameter, which is a list of integers. Assume that the list has at least two integers. The function returns the difference between the largest and smallest elements in the list. For example, when the function's argument is [10, 3, 5, 6], the function returns 7. Although the most Pythonesque solution is: def big_diff(nums): return max(nums) - min(nums) don't use this as your solution. Your function is not permitted to call Python's min and max functions. Your function must have exactly one loop. Your function definition must have type annotations and a complete docstring. Use the Python shell to test your function

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!