Question: Question 24 - Implementation Implement a function (named Answer24) that takes as input a string and returns a dictionary The input string contains numbers separated

Question 24 - Implementation Implement a function (named Answer24) that takes as input a string and returns a dictionary The input string contains numbers separated by commas. For example, A "1.0,2.0,3.0" Note: the input string contains only numbers and commas, no other characters Inside the function, the following tasks are performed: Task-1 is to split the input string into a list of numbers, e.g., B [1.0, 2.0, 3.0 Task-2 is to calculate: (1) mean of the numbers in the list, which is sum(B) divided by len(B) (2) max (3) min Task-3 is to build and return a dictionary that contains three keys: 'mean', 'max', 'min' and corresponding values from Task-2 For example, the returned dictionary is ['mean': 2.0, 'max':3.0, 'min':1.0 for the input A 1.0,2.0,3.0" Special case: the input string may be empty, e.g., A-" then the function returns this dictionary: 'mean': None, 'max':None, 'min':None The special case should be handled at the beginning of the function You can use the built-in functions, max, min and sum in Pythorn See the document about the functions: https://docs.python.org/3/library/functions.html Read question 15 & 16 again and read zyBooks about split
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
