Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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