samedi 28 février 2015

I am new to python.Please help me to do this


Vote count:

-1




shopping_list = ["banana", "orange", "apple"]


stock = { "banana": 6, "apple": 0, "orange": 32, "pear": 15 }


prices = { "banana": 4, "apple": 2, "orange": 1.5, "pear": 3 }


Want to calculate compute_bill function:


While you loop through each item of food, only add the price of the item to total if the item's stock count is greater than zero. If the item is in stock and after you add the price to the total, subtract one from the item's stock count.



asked 1 min ago







I am new to python.Please help me to do this

Aucun commentaire:

Enregistrer un commentaire