id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu set1 > fixGrades
prev  |  next  |  chance

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)

public ArrayList<Integer> fixGrades(ArrayList<Integer> n){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy