A day at supermarket


#1

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

stock={
'banana':6,
'apple':0,
'orange':32,
'pear':15
}
for n in prices:
print n
print "price %s" % prices[n]
print "stock %s" % stock[n]

Oops, try again. Check what your code prints for orange. It doesn't look quite right!


A day at supermarket
#2

the output needs to be an exact match, you mis some colons


#3

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