On Tue, Jan 12, 2016 at 12:36 PM, Chelsea G <cegarcia0...@gmail.com> wrote: > So I am importing a csv file to textfile and the first column is product > names and the second is a description of each. I am trying to find the sum > of all descriptions using sum(c.values)). Here is my code so far:
[code cut] Code is sometimes useful, but it's also very important to express what you see is going wrong. Or, at the very least, try to explain the problem as best as possible. At the moment, all you've said is, effectively: 1. I have this program. 2. I need help!!! Here's why these two pieces are often not enough. 1. If your program can be executed by us, it may not be obvious or clear that there's anything wrong with the program. If your program doesn't run, that's also no guarantee that we can do anything effective. For example, if we don't have your input file 'weekly_20160102.csv', we can't determine whether your input is well-formed or not: perhaps the input itself is wrong, and your program might be perfectly ok? Or maybe it runs, but returns the wrong output. How could we tell, though? What it means to have "wrong" output is something that's in your head, and because we are not mind readers, we may not know what "right" output looks like. Or maybe it doesn't run. In that case, if you show us the error, we have an opportunity to explain what the error is trying to say, so that you can understand what it means. If you show us the error, then we're more assured that we both are looking at the same thing. The key thing here is: when you're asking for help on a program, try to state up front what correct output looks like. If the input is big, then take a subset of the input, simplify it if necessary, and present that to us. Finally, present what you want the expected result to look like. Concrete is best. When you say: " I am trying to find the sum of all descriptions", I have to truthfully say that I have no idea what this means. Try expressing the idea concretely in terms of what the input looks like, and what the output looks like. 2. I know this will sound funny, but desperation doesn't work very well as a strategy to get complicated things done. Try to calm down. If one is in "panic mode", then that person's brain is in a flight-or-flight reactive state. That would be productive if one could run physically fast enough to get a program fixed. But programming is just not athletic. Programming, and learning in general, is something that's easier to do when you're not struggling with immediate survival. I'm not joking: I'm being very serious. Please try to de-escalate the stakes: don't make this a life-or-death situation. Good luck! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor