| about | help | code help+videos | done | prefs |
A teacher allows student to complete an assignment after taking an exam to improve their exam score if they choose. Completing the assignment earns the student half the points they failed to earn when they originally took the exam but they can't earn less than 5% of the total points possible. Therefore, a student that gets an 80 out of 100 can earn an additional 10 points bringing their new score up to 90 while a student that score 95 out of 100, will end up with a score of 100 because the fewest points that can be earned on a 100 point test is 5! This does mean that it is possible to earn a score that is higher than 100%. Write a method with two parameters, the original score and the highest possible score that calculates the improved score if the student completes the assignment.improvedScore(99, 99) → 103.95 improvedScore(50, 100) → 75.0 improvedScore(98, 100) → 103.0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100 Post-solution available
Copyright Nick Parlante 2017 - privacy