def calc(item):
    if item["type"] == "book":
        return item["price"] * 0.90
    return item["price"]
