This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
class Item: | |
pay_rate = 0.85 #20% discount for customers | |
all = [] | |
def __init__(self, name: str, price: float, quantity = 0): | |
# run validations for received arguments | |
assert price >= 0, f'price {price} must be positive or zero!' | |
assert quantity >= 0, f'quantity {quantity} must be positive or zero!' |