Stocks

Write a function @total_stock(stk1, stk2)@ that provided two product
stocks returns the total stock. Each stock is a dictionary whose keys
are strings representing product codes (or product names) and values are
integers representing the number of available units. For instance, the
dictionary {^(′)orange^(′) : 5,^(′)lemon^(′) : 2,^(′)tangerine^(′) : 1}
represents a stock of five oranges, two lemons and one tangerine.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T16:14:11.542Z

© Jutge.org, 2006–2026.
https://jutge.org
