runtime
186 / 500
question 186 Files & Directories · medium

Why is the total always zero?

summarize should return how many orders an export holds and their total value. On orders.csv it returns (4, 0): one order too many, and a total of zero. Find and fix every problem.

Functionsummarize(path)
Filea header line order_id,total, then one order_id,total line per order
Returns(number of orders, sum of the totals); orders.csv gives (3, 141.41)
Examples
callsummarize('orders.csv')returns(3, 141.41)

Loading your progress…

Why is the total always zero? — Python practice · Runtime