Where is the error?


#1

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

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

for key in prices:
print “%s” %key
print "price:%s " %prices[key]
print “stock: %s\n” %stock[key]

error message:Check what your code prints for orange. It doesn’t look quite right!

Please help me!!!


#2

Hi @sumeyras,

Though the output looks good with a skipped line between the data for each item, Codecademy does not want the data to be presented in that manner. To pass, remove the "\n" character from the format string in this line …

  print “stock: %s\n” %stock[key]

#3