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

 

finalMark


Define a function that when passed two integer arrays, the first containing weights of individual assessments, and the second containing the marks a student got in each of those assessments, returns the overall mark of the student out of 100. You may assume that, 1. The two arrays are of the same size. 2. The sum of items of weights is 100.


finalMark([25, 25, 25, 25], [100, 100, 100, 99]) → 99.75
finalMark([10, 20, 30, 40], [95, 85, 75, 63]) → 74.2
finalMark([40, 60], [80, 10]) → 38.0

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

double finalMark(int[] weights, int[] marks) { }

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