Codington
0 of 6 problems solved • 0%

Exercise prompt

Predict the Reorder

A buyer compares updated stock with a target. Trace the movements before calculating the order quantity.

Predict the output

How many units of tea will the buyer order?

stock = {"tea": 4} for delivery in [-3, 2]: stock["tea"] += delivery target = 6 print(max(0, target - stock["tea"]))
What will this code print?