






'''simple docstring'''







import random






class        a__     :
     '''simple docstring'''







     def __init__(self     :						Any					,					lowercase__     :						float					,					lowercase__     :						float       )	->							None:
           __A		 =   x
           __A		 =   y






     def      _UpperCamelCase (self     :						Any       )	->							bool:
           return (self.x**2 + self.y**2) <= 1






     @classmethod
     def      _UpperCamelCase (cls     :						int       )	->							Dict:
           return cls(x=random.random()					,					y=random.random()       )







def     _UpperCamelCase				(  snake_case__				):
      if number_of_simulations < 1:
            raise ValueError("At least one simulation is necessary to estimate PI."				)

      __A		 =   0
      for _ in range(snake_case__				):
            __A		 =   Point.random_unit_square()

            if random_point.is_in_unit_circle():
                  number_in_unit_circle += 1

      return 4 * number_in_unit_circle / number_of_simulations


if __name__ == "__main__":
       # import doctest

       # doctest.testmod()
       from math import pi

       __A   :							Tuple     	=						'Please enter the desired number of Monte Carlo simulations: '
       __A   :							str     	=						estimate_pi(int(input(prompt).strip()))
       print(F"""An estimate of PI is {my_pi} with an error of {abs(my_pi - pi)}""")










'''simple docstring'''







def     _UpperCamelCase				(  snake_case__				):
      if len(snake_case__				) <= 1:
            return data
      else:
            return [
                *quick_sort([e for e in data[1:] if e <= data[0]]				),
                data[0],
                *quick_sort([e for e in data[1:] if e > data[0]]				),
            ]


if __name__ == "__main__":
       import doctest

       doctest.testmod()


