def cheapest_product_adv(): print_header(" Cheapest price advance") if (len(catalog) < 1): print("** Error, empty catalog. Register prods first.") return cheapest = catalog[0] #check if prod is cheaper than cheapest, if it is, then prod is my new cheapest for prod in catalog: if (prod.price < cheapest.price): cheapest = prod print_product(cheapest) """
def out_of_stock(): print_header("Currently Out of Stock") for prod in catalog: if (prod.stock == 0): print_product(prod)
def print_catalog(): print_header(" Current Catalog ") for prod in catalog: print_product(prod)