Hey could someone help me out


#1



https://www.codecademy.com/en/courses/python-beginner-en-IZ9Ra/1/3?curriculum_id=4f89dab3d788890003000096


Oops, try again. You should have exactly three print statements! (Make sure there are no occurrences of 'print' in any comment or string!)


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


#2

the product, price and stock should be printed at separate lines with 3 print statements


#3

sorry I don't really understand what you mean could you try and explain it in more depth


#4

your currently have 1 print statement which causes the following output:

orange price: 1.5 stock: 32

all on 1 line, but in the example:

apple
price: 2
stock: 0

the output is on 3 seperate lines, you should also have this

This is achieved by using 3 print statements


#5

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