Freedom Town: Aesthetic and Recreational Lawn Alternative

  • Wanna Join? New users you can now register lightning fast using your Facebook or Twitter accounts.
Jun 21, 2016
892
5,398
0
shopping_list = ["banana", "orange", "apple"]

stock = {
"banana": 7,
"apple": 1,
"orange": 33,
"pear": 15
}

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

def compute_bill(food):
total = 0
for item in food:
if stock[item]>0:
total+=prices[item]
stock[item]-=1
return total
compute_bill(shopping_list)


gaaay can't paste with correct indentation
 
Last edited:
May 4, 2002
10,361
20,634
113
Samsung has a promo for its s8+, turn in ANY iso or android smart phone and get $200 off. That would make the price like $534, i have an old ass iphone 3gs or some shit that isnt worth anything.

But i really want the note 8 when it drops...