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

 

konstans@stuy.edu > testGrader
prev  |  next  |  chance

Given two ArrayList of String with the same size(), answers and key, check if the values in answers match the corresponding value in key. If they match it counts as 4 points. If they do not match it counts as -1, Unless the answer was "" the empty string, in which case 0 points are awarded. You may


testGrader(["", ""], ["hi", "ho"]) → 0
testGrader(["hi", "ho"], ["hi", "ho"]) → 8
testGrader(["HI", "HI"], ["hi", "hi"]) → -2

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

public int testGrader( List<String> answers, List<String> key){ }

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