





def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase       ):
       _UpperCamelCase														=    1
       _UpperCamelCase														=    0
       _UpperCamelCase														=    1
       _UpperCamelCase														=    1
       _UpperCamelCase														=    3
       _UpperCamelCase														=    3
       _UpperCamelCase														=    limit
       _UpperCamelCase														=    0

       _UpperCamelCase														=    ''''''
       while counter != decimal + 1:
              if 4 * q + r - t < n * t:
                     result += str(_UpperCAmelCase       )
                     if counter == 0:
                            result += "."

                     if decimal == counter:
                            break

                     counter += 1
                     _UpperCamelCase														=    10 * (r - n * t)
                     _UpperCamelCase														=    ((10 * (3 * q + r)) // t) - 10 * n
                     q *= 10
                     _UpperCamelCase														=    nr
              else:
                     _UpperCamelCase														=    (2 * q + r) * l
                     _UpperCamelCase														=    (q * (7 * k) + 2 + (r * l)) // (t * l)
                     q *= k
                     t *= l
                     l += 2
                     k += 1
                     _UpperCamelCase														=    nn
                     _UpperCamelCase														=    nr
       return result


def      SCREAMING_SNAKE_CASE      (   ):
       print(f'''{calculate_pi(50       ) = }'''       )
       import doctest

       doctest.testmod()


if __name__ == "__main__":
       main()











def 	__snake_case      (     _UpperCAmelCase							):
    __a					=							1
    __a					=							0
    __a					=							1
    __a					=							1
    __a					=							3
    __a					=							3
    __a					=							limit
    __a					=							0

    __a					=							''''''
    while counter != decimal + 1:
        if 4 * q + r - t < n * t:
            result += str(_UpperCAmelCase							)
            if counter == 0:
                result += "."

            if decimal == counter:
                break

            counter += 1
            __a					=							10 * (r - n * t)
            __a					=							((10 * (3 * q + r)) // t) - 10 * n
            q *= 10
            __a					=							nr
        else:
            __a					=							(2 * q + r) * l
            __a					=							(q * (7 * k) + 2 + (r * l)) // (t * l)
            q *= k
            t *= l
            l += 2
            k += 1
            __a					=							nn
            __a					=							nr
    return result





def 	__snake_case      (     ):
    print(f'{calculate_pi(50							) = }'							)
    import doctest

    doctest.testmod()


if __name__ == "__main__":
 main()





