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

 

jebbert@volusia.k12.fl.us > test2021_02_11_SLHL_grades
prev  |  next  |  chance

Write a method that accepts two arrays 'first' and 'second' which contain the percent grades in classes for the first and second grading period. For example, index 0 in 'first' represents the grade earned in course 0 for the first grading period. Index 0 in 'second' represents the grade earned in course 0 for the second grading period. For each of these pairs of grades, numerically average them together, then report it as a letter grade. As a precondition, you may assume that arrays 'first' and 'second' will always have the same length. Look at the test data for examples.


test2021_02_11_SLHL_grades([85.4, 45.98, 52.35, 75.45, 86.2], [92.4, 85.2, 63.75, 85.1, 89.2]) → ["B", "D", "F", "B", "B"]
test2021_02_11_SLHL_grades([57.3, 73.1, 89.3, 44.7], [89.3, 84.1, 91.7, 72]) → ["C", "C", "A", "F"]
test2021_02_11_SLHL_grades([55, 85, 75, 65], [65, 95, 85, 75]) → ["D", "A", "B", "C"]

...Save, Compile, Run (ctrl-enter)

public String[] test2021_02_11_SLHL_grades(double[] first, double[] second) { }

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

Difficulty: 240

Copyright Nick Parlante 2017 - privacy