FunctionRacerProblemsRace

Whole Dollars

EasyNumPyPython

Round every price in prices to the nearest whole dollar and return the results as a list of ints. No price will end in exactly .5.

Example 1

prices [2.3,4.8,10.0]
returns [2,5,10]

2.3 rounds to 2, 4.8 rounds to 5.

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