10/8 Keeping Track of the Produce


#1

Something goes wrong. I mean the code works, but the maschine always ask me to " Check what your code prints for orange. It doesn't look quite right! " and I cannot move further. Maybe you've got the same problem?

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

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

for key in prices:
if (key=="apple"):

   print "price:" + str(prices[key])
   print "stock:" + str(stock[key])

#2

Make sure the code is intact in your post


#3

thanks, I have already found the decision! hooorey :smile: