A small shop wants to track stock and get a list of items that are running low.
Write a class Stock with:
receive(item, qty) that adds units of an itemsell(item, qty) that removes units, raising ValueError("not enough stock") if there aren't enough (an unknown item has 0)low(threshold) that returns an alphabetically sorted list of items with fewer than threshold units, including items that have dropped to 0How it's checked
Your code runs, then the check below runs and its printed output is compared with ours.
low(2) returns ["mug"]Hints, the later steps and the answer come with Pro.
class Stock:
def __init__(self):
...