Timeline for Pset 3: Grocery list, the program ends after one item is inputted
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 9 at 16:36 | comment | added | UpAndAdam | because infinite loops are bad.. the control-D doesn't break the loop, it causes an exception that YOU use to break the loop. The user doesn't interact with loops. its a better practice to use a variable then to use a while true, and break on the exception that you catch... thats not a the biggest problem you had though. far from it. The biggest problem is you reset the cart in every pass of your function calls. | |
Apr 9 at 16:24 | comment | added | Elvino Michel | Why would we make a new variable to exit the loop, when the user should exit the loop with control D? | |
Apr 9 at 16:23 | comment | added | Elvino Michel | Why is a dictionary a good / clever solution? | |
Mar 31 at 18:22 | comment | added | UpAndAdam | dont just take in code you dont understand the thing is you have no need to have duplicates in the first place and that code isnt particularly good | |
Mar 30 at 21:14 | comment | added | Elvino Michel | Regarding the dictionary comprehension: yes, was trying to find a way to count duplicates element in the list, googled and found this Stackoverflow question. | |
Mar 30 at 21:10 | comment | added | Elvino Michel | Many thanks for your extremely high amount of comments, it is a lot to take in, I am digesting it. | |
Mar 29 at 14:11 | history | edited | UpAndAdam | CC BY-SA 4.0 |
added 1377 characters in body
|
Mar 28 at 19:16 | history | answered | UpAndAdam | CC BY-SA 4.0 |