Stuck in 'A Day at the Supermarket' lesson


link: exercise

the error message says:

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

and I guess I expected something better than an error message, haha

I’ve tried:

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

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

for p in prices:
  print (str(p) + '\nprice: ' + str(prices[p]) +
         '\nstock: ' + str(stock[p]) +'\n')


The instructions ask you to have 3 print statements. You only have one. Reread the instructions.


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