FunctionRacerProblemsRace

Shopping Total

BeginnerNumPyPython

prices[i] is the price of item i and counts[i] is how many of it you buy. Return the total cost of the whole basket as an int.

Example 1

prices [3,10]
counts [2,1]
returns 16

3 * 2 + 10 * 1 = 16.

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 NumPy problems