8/13 Keeping Track of Produce, requires three print statements


#1

https://www.codecademy.com/courses/learn-python/lessons/a-day-at-the-supermarket/exercises/keeping-track-of-the-produce-?action=lesson_resume

You should have exactly three print statements! (Make sure there are no occurrences of ‘print’ in any comment or string!)

I believe I have done as the course has asked, but I don’t understand what the third print statement is supposed to be. What am I missing?

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

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

for key in prices:
  print "Price: %s" % prices[key]
  print "Stock: %s" % stock[key]

#2

Like the example above, for each key, print out the key along with its price and stock

i count 3: key, price and stock. In your code i see 2 (price and stock)


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.