A day at the supermaket


#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 prices: 2
print stock: 0
Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 14)


#2

Should both of these be prices? or should one be price? :thinking:


#3

Like the example above, for each key, print out the key along with its price and stock information. Print the answer in the following format:


#4

You have prices not price it would seem.


#5

can you give an example because I'm getting confused


#6

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