how to calculate reputation

DJC djc at news.invalid
Sat Jul 6 09:23:25 EDT 2013


On 03/07/13 02:05, Mark Janssen wrote:
>> Hi all, this seems to be quite stupid question but I am "confused"..
>> We set the initial value to 0, +1 for up-vote and -1 for down-vote! nice.
>>
>> I have a list of bool values True, False (True for up vote, False for
>> down-vote).. submitted by users.
>>
>> should I take True = +1, False=0  [or] True = +1, False=-1 ?? for adding
>> all.
>>
>> I am missing something here.. and that's clear.. anyone please help me on
>> it?
>
> If False is representing a down-vote, like you say, then you have to
> incorporate that information, in which case False=-1  ==> a user not
> merely ignored another user, but marked him/her down.


You could express the result as 'x out of y users up-voted this' where x 
= total true and y = x + total_false



More information about the Python-list mailing list