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

 

abraskin@mbusd.org 2016_problem_set_06-djklslwf > getScore
prev  |  next  |  chance

Given two parallel arrays, one of student names, and an equal length array of integer scores, return the score of the student matching the final parameter or -1 if the student isn't found.


getScore(["Fritz", "Clyde", "Monty", "Penelope", "Liza"], [94, 95, 100, 100, 95], "Clyde") → 95
getScore(["Adam", "Belinda", "Carly", "Jimmy", "Ann"], [94, 95, 99, 88, 92], "Clyde") → -1
getScore(["Ken", "Gena", "Jason", "Aaron", "Shawn", "David"], [100, 70, 95, 99, 75, 75], "Gena") → 70

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

public int getScore(String[] names, int[] scores, String scoreOf) { }

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: 200

Copyright Nick Parlante 2017 - privacy