about | help | code help+videos | done | prefs |
You are writing a grade "fixing" program to "help" [insert rival school] students compete with your school! Given an array that contains a set of integer scores, calculate the mean (average) and then modify the array as follows: Any grade above average gets cut in half. Any grade below average gets doubled, but has a maximum of 100. Return the modified array when you are done. Write a helper method to calculate the mean of the scores. fixGradesArray([]) → [] fixGradesArray([80, 80, 90, 90, 70, 70]) → [80, 80, 45, 45, 100, 100] fixGradesArray([0, 0, 0, 0, 0, 0]) → [0, 0, 0, 0, 0, 0] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy