Question: Exercise 2 Step 1: Create a new editor window and save it as a file named lab11ex2.py. Step 2: Use the function design recipe from
Exercise 2 Step 1: Create a new editor window and save it as a file named lab11ex2.py. Step 2: Use the function design recipe from Chapter 3 of Practical Programming to develop a function named average. The function takes a list of tuples, and each tuple contains three nonnegative integers. The function returns a new list of tuples. The three numbers in each tuple are the integer average values of the numbers in the tuple at the same position in the original list. For example, suppose the first tuple in the list passed to average is (27, 219, 134). The integer average of these values is 126, so the first tuple in the new list will be: (126, 126, 126). (Hint: what Python division operator will produce a value of type int when the average is calculated?) 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
Get step-by-step solutions from verified subject matter experts
