FunctionRacerProblemsRace

Weighted Grade

EasypandasPython

parts has columns score and weight (positive numbers). Return the weighted average as a float: the sum of score * weight divided by the sum of the weights.

Example 1

parts {"score":[80,100],"weight":[1,3]}
returns 95.0

(80 + 300) / 4 = 95.0.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More pandas problems