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

 

srp4379@lausd.net > getGrade
prev  |  next  |  chance

getGrade(score): Given a test score in the range 0-100, return a number representing the Letter score. Any score 90-100 is an A (so return 4). Any score 80-89 is a B (return 3). Any score 70-79 is a C (return 2). Any score 60-69 is a D (return 1). Less than 60 is an F (return 0). RUBRIC: It is not enough to just solve the problem. Make sure you use PROPER INDENTATION. You MUST use CURLY BRACKETS for all loops and if/else statements. Also, the more EFFICIENT your solution, the higher your grade. If you have extraneous (superfluous / unnecessary) code, deductions will be taken.


getGrade(95) → 4
getGrade(59) → 0
getGrade(65) → 1

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

public int getGrade(int score) { }

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

Copyright Nick Parlante 2017 - privacy