本文实例讲述了python概率计算器实现方法。分享给大家供大家参考。具体实现方法如下:
from random import randrange
#randrange form random module
def calc_prob(strengths):
"""A function that receives an array of two numbers
indicating the strength of each party
and returns the winner"""
if strengths[1]>strengths[0]:
#Bring the bigge