Please help me with error "Check what your code prints for orange"


#1

for p in prices:
if p == "apple":
print "apple"
print "price: %s" % prices["apple"]
print "stock: %s" % stock["apple"]


Replace this line with your code.


#2

you use a loop, so you can print the product name, price and stock for all items in the dictionary.

Change the code, so it works for all products, not just apples


#3

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