Something of Value


#1



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.

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


#2

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]

#3

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