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

 

xcPoints


Calculate the number of extra-credit points that can be earned by completing the post-test AP Computer Science A assignment.


The score is calculated by first subtracting the number of points earned from the total points possible on the exam and dividing it in half.

But if this number is less than 5% of the total points possible then the score is 5% of the total points possible instead.

xcPoints(0, 30) → 15.0
xcPoints(21.6, 30) → 4.199999999999999
xcPoints(24.6, 30) → 2.6999999999999993

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

public double xcPoints(double score, double totalPointsPossible) { }

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