An ambiguity error


#1

Could you please explain what is wrong in this code

prices={
"banana":4,
"apple":2,
"orange":1.5,
"pear":3,
}
stock={
"banana":6,
"apple":0,
"orange":32,
"pear":15,
}
for key in prices:
print key
print "prices : %s "% prices[key]
print "prices : %s"% stock[key]


#2

If you see the example they showed in the instructions of what they want, it shows this:

apple
price: 2
stock: 0

What you have is something like this:

apple
prices : 2
prices : 0

Notice the difference?


#3

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