Write final_grade(scores, weights): one final grade from several scores, where some count more than others. The weights can be any positive amounts: percents like 20, 30, 50, or parts like 2, 3, 5.
A course has homework, a midterm and a final, and the final counts the most. Each score sits on the beam as a stack as heavy as it counts. The final grade is where the beam balances: where is that? Drag a stack to change how much it counts, and type a grade to try.
final_grade(scores, weights)| scores | one per piece of work, e.g. [80, 90, 70] | e.g. [85, 85, 85] |
| weights | how much each one counts, e.g. [20, 30, 50] | e.g. [20, 30, 50] |
| returns | one final grade | |