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

 

grade


In COMP1000, passing requirements are: 1. Get a raw mark of 50 or more out of 100. 2. Perform satisfactorily (defined as 50% in the exam) in the hurdle exam (which is worth 40% of the total mark). If your raw mark is less than 50, your grade is "F". If your raw mark is 50 or more, but you don't perform satisfactorily in the hurdle, your grade is "FH". If your raw mark is 50 or more and you perform satisfactorily in the hurdle, your grade is "P". Define a function that when passed the raw mark (out of 100), and the practical exam marks (IMPORTANT!!! As a percentage mark), returns the grade of the student.


grade(70, 49) → "FH"
grade(70, 50) → "P"
grade(49, 100) → "F"

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

String grade(int rawMark, int pracExamMark) { }

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: 2 Post-solution available

Copyright Nick Parlante 2017 - privacy