Question: Example: Given a list of 100K values, find the average and range of the list This is a task that is easier for computers because

Example: Given a list of 100K values, find the average and range of the list This is a task that is easier for computers because we can write down a clear set of steps to complete this task (we can write an algorithm). Humans would not be good at completing this task, as there are a lot of steps to complete, and it would be slow, and we might not have the memory to do it. n [19]: # Pseudocode for array statistics def array_statistics(a,b): for x in range(a,b): length = len(x) print(length) average - (average + x)/ length return average y = array_statistics (1,100000) print(y) # Find the mean of the array. pass # To do so: # Find the total sum of the array # Find the number of elements in the array # Divide the sum by the number of elements # Find the range of the array. pass # To do so: # Find the maximum value of the array # Find the minimum value of the array # Calculate range by subtracting the max from the min for the array # Return the mean and range of the array return None TypeError Traceback (most recent call last)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
