def total_price():
    _total_price = 100 * 2 * 1.08 
    _total_price += 200 * 1.1 
    return _total_price

pritn(total_price())



def total_price(prices, item_kinds):
    _total_price = 0
    for index, price in enumerate(prices):
        item_kind = item_kinds[index]
        if item_kind == "food":
            _total_price += price * 1.08
        else:
            _total_price += price * 1.1
    return _total_price


print(total_price([100, 100, 200], ["food", "food", "item"])) 



class Item:
    def __init__(self, name, kind, price):
        self.name = name
        self.kind = kind
        self.price = price


def total_price(items):
    _total_price = 0
    for item in items:
        if item.kind == "food":
            _total_price += item.price * 1.08
        else:
            _total_price += item.price * 1.1
    return _total_price


items = [Item("アンパン", "food", 100), Item("アンパン", "food", 100), Item("ペン", "item", 200),]
print(total_price(items))



class Item:
    def __init__(self, name, kind, price):
        self.name = name
        self.price = price
        self.kind = kind
        if kind == "food":
            self.tax_rate = 0.08
        else:
            self.tax_rate = 0.1


def total_price(items):
    _total_price = 0
    for item in items:
        _total_price += item.price * (1 + item.tax_rate)
    return _total_price


items = [Item("アンパン", "food", 100), Item("アンパン", "food", 100), Item("ペン", "item", 200),]
print(total_price(items))



class Item:
    def __init__(self, name, kind, price):
        self.name = name
        self.kind = kind
        self.price = price
        if kind == "food":
            self.tax_rate = 0.08
        else:
            self.tax_rate = 0.1

    def price_with_tax(self):
        return self.price * (1 + self.__tax_rate)


def total_price(items):
    return sum([item.price_with_tax() for item in items])


items = [Item("アンパン", "food", 100), Item("アンパン", "food", 100), Item("ペン", "item", 200),]
print(total_price(items))



class Item:
    def __init__(self, name, price):
        self.name = name
        self.price = price

    def tax_rate(self):
        return 0.1

    def price_with_tax(self):
        return self.price * (1 + self.tax_rate())


class Food(Item):
    def tax_rate(self):
        return 0.08


def total_price(items):
    return sum([item.price_with_tax() for item in items])


items = [Food("アンパン", 100), Food("アンパン", 100), Item("ペン", 200),]
print(total_price(items))



class Book(Item):
    def tax_rate(self):
        return 0.01



function purchaseOperation(customer, item) {
    customer.login();
    customer.buy(item);
    new ThankyouMail(item, customer).send();
}



function deleteItemOperation(item, staff) {
    staff.login();
    staff.delete(item);
}


