Skip to content

Instantly share code, notes, and snippets.

@stevencombs
Created August 12, 2013 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencombs/6215945 to your computer and use it in GitHub Desktop.
Save stevencombs/6215945 to your computer and use it in GitHub Desktop.
# Print Inventory and Cost of Fruit
# A Codecademy Python (Keeping Track of Produce) assignment
# Dr. Steven B. Combs, coding novice
for cost in prices:
print cost
print "price: " + str(prices[cost])
print "stock: " + str(stock[cost])
prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3
}
stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment