git-practice/cart.py
ኮድና የመጀመሪያ የምርት ማያዎች የመጀመሪያ ቋንቋቸውን ይጠብቃሉ። ትምህርቱ በመረጥከው ቋንቋ ያብራራቸዋል።
def calc(item):
if item["type"] == "book":
return item["price"] * 0.90
return item["price"]
ኮድና የመጀመሪያ የምርት ማያዎች የመጀመሪያ ቋንቋቸውን ይጠብቃሉ። ትምህርቱ በመረጥከው ቋንቋ ያብራራቸዋል።
def calc(item):
if item["type"] == "book":
return item["price"] * 0.90
return item["price"]