about | help | code help+videos | done | prefs |
fixGrades
You are writing a grade fixing program to help [insert rival school] students compete with your school! Given an ArrayList that contains a set of grades, calculate the average. Modify the ArrayList as follows: any grade above average gets cut in half. Any grade below average gets doubled, but has a maximum of 100. fixGrades([80, 80, 90, 90, 70, 70]) → [80, 80, 45, 45, 100, 100] fixGrades([72, 53, 57, 62, 72, 66]) → [36, 100, 100, 100, 36, 33] fixGrades([64, 66, 55, 70, 72, 58]) → [100, 33, 100, 35, 36, 100] ...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