Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This is good but be careful with the logic here when you implement it, OP. If you change the operator sign, you could run into problems because of the stacked elif structure. For instance, you can't flip the signs to > or you'll have problems. Commented Nov 18, 2013 at 20:14
  • 1
    After writing it, it also looked pretty difficult to maintain. I'd use a hash to store probabilities which would be much easier to maintain. Or something clean like the answer in this question, since you could easily add or remove cases. Commented Nov 18, 2013 at 20:17
  • @Keikoku Modified it a little bit and it worked great, and thanks to all the others that gave an answer all of them helped when I was modifying it to fit my needs. Commented Nov 18, 2013 at 21:35