(repeat = 20000)
return PI
:param repeat: integral

    :return: float
:param repeat: integral
: param repeat : integral
def solve_pi(repeat = 20000) -> float:
    '''
    :param repeat: integral

    :return: float
    '''
    count = 0
    for i in range(repeat):
        x = random.random()
        y = random.random()
        if x*x + y*y < 1.0:
            count += 1

    ratio = count / repeat
    PI = 4 * ratio
    return PI
def solve_pi ( repeat = 20000 ) -> float : count = 0 for i in range ( repeat ) : x = random . random ( ) y = random . random ( ) if x * x + y * y < 1.0 : count += 1 ratio = count / repeat PI = 4 * ratio return PI