Sep-29-2019, 02:13 PM
A couple of things. On line 7 you have
On line 9 you add the two scores together. So there is no need to sum them on line 10. And that is why you are getting an error. The sum function is for a list of numbers, and you are passing it one number. But like I said, you don't need that.
To get the full output, you are going to want to build a list with append in your for loop. Here's an example:
float(row['Auto Score'])
. So auto_score is a float. Therefore, there is no reason for float(auto_score)
on line 9. You can just use auto_score.On line 9 you add the two scores together. So there is no need to sum them on line 10. And that is why you are getting an error. The sum function is for a list of numbers, and you are passing it one number. But like I said, you don't need that.
To get the full output, you are going to want to build a list with append in your for loop. Here's an example:
sums = [] for x in range(5): sums.append(x + x)However, you are going to want to append a tuple of the username and the total. Once you have that list, you can send it through csv.writer to output the data to a file.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures