Something of Value


Something of Value:
total = 0
for key in prices:
    prices[key] *= stock[key]
    print prices[key]
    total += prices[key]
print int(total)

Is this correct? I keep getting error messages saying that 117 is not correct.


The instructions are a bit unclear, but you should not change the values in the prices dictionary.

This means you can't do:

prices[key] *= stock[key]


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