Day at the Supermarket: Keeping Track of Produce


Hi, I'm currently experiencing issues with this specific exercise, it seems that i have completed the task with the right formatting of the numbers but it continues to say that it does not look quite right. I assume this is because I completed the task slightly different from what the program is expecting and doesn't recognize completion

If someone could help me to understand if perhaps my code does not exactly execute what it seems to please let me know.

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


It seems like there is some error with the first print statement. Re-check with the cost because it directly prints cost but there is nothing associated with the cost. But instead, put parenthesis to the cost and see if it helps.


print Price and Stock in lowercase - it helps


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