Question: Create a function that accepts HashMap with Key of String and Value of Int, and returns array with two elements. The first element of the

 Create a function that accepts HashMap with Key of String and

Create a function that accepts HashMap with Key of String and Value of Int, and returns array with two elements. The first element of the output array is sum of all values of input HashMap and the second one is the average of all numbers. Ex1 : INPUT : "Alex" : 87 , "Ricardo" : 93, "Jeo" : 59] => OUTPUT [239, 79.666] Ex2: INPUT : ["Richard" : 80, "Alex" 100] => OUTPUT [180, 901

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 Programming Questions!