Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: how to calculate reputation

Thread Tools

Re: how to calculate reputation

Ian Kelly
Posts: n/a
On Tue, Jul 2, 2013 at 3:43 PM, Surya Kasturi <(E-Mail Removed)> 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.
> [True, False, False, True....]
> Now to calculate the total reputation
> should I take True = +1, False=0 [or] True = +1, False=-1 ?? for adding
> all.

You're using False to represent a down-vote and you want down-votes to
count as -1, so you would count a False value as -1.

Now why don't you just use 1 and -1 to represent the votes instead of
True and False? Then you won't need to worry about this conversion
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to calculate reputation Surya Kasturi Python 5 07-03-2013 12:18 AM
How to get JSON values and how to trace sessions?? Python 2 04-25-2013 02:12 PM
OT: How to calculate reputation scores? Mike Perl Misc 1 05-25-2012 04:53 PM
As expected: Microsoft Earns Best Corporate Reputation in 2004 Gerry Sincere Computer Support 46 02-14-2005 09:20 PM
Microsoft Earns Best Corporate Reputation in 2004 Gregor Samsa Computer Support 0 02-13-2005 11:31 AM