Re: [Tutor] Looping through Dictionaries

2017-05-23 Thread Mats Wichmann
On 05/23/2017 11:38 AM, Rafael Knuth wrote: > I wrote a function (shopping list) which calculates the total price of > the purchase (quantity * price) as well as the stock change (stock - > quantity). I know the latter is imperfect (my function does not take > into account if items are out of stock

Re: [Tutor] Looping through Dictionaries

2017-05-23 Thread Alan Gauld via Tutor
On 23/05/17 18:38, Rafael Knuth wrote: > Now, I want to print the item next to the stock update, and I am > receiving an error message. I couldn't figure out how to fix that: So show us the error message, all of it. I can't begin to guess what it might be. UI also don't understand what "print th

[Tutor] Looping through Dictionaries

2017-05-23 Thread Rafael Knuth
I wrote a function (shopping list) which calculates the total price of the purchase (quantity * price) as well as the stock change (stock - quantity). I know the latter is imperfect (my function does not take into account if items are out of stock for example, but that's my next challenge. The func