


'''simple docstring'''



import random



class       a							:


     """simple docstring"""






     def __init__(							self	:						int				,					snake_case	:						float				,					snake_case	:						float     )		->				str:
          __UpperCAmelCase      :					Union[str, Any]    				=     x
          __UpperCAmelCase      :					int    				=     y

     def 					lowerCamelCase__					(							self	:						List[Any]     )		->				Optional[Any]:
          return (self.x**2 + self.y**2) <= 1






     @classmethod
     def 					lowerCamelCase__					(							cls	:						Optional[int]     )		->				Tuple:
          return cls(x=random.random()				,					y=random.random()     )




def       _a      (		_lowercase   :      Union[str, Any]    ):





     '''simple docstring'''






     if number_of_simulations < 1:
          raise ValueError('''At least one simulation is necessary to estimate PI.'''    )

     __UpperCAmelCase      :					Tuple    				=     0
     for _ in range(_lowercase    ):
          __UpperCAmelCase      :					Dict    				=     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

      __UpperCAmelCase     :Optional[Any]												=  """Please enter the desired number of Monte Carlo simulations: """
      __UpperCAmelCase     :int												=  estimate_pi(int(input(prompt).strip()))
      print(f"""An estimate of PI is {my_pi} with an error of {abs(my_pi - pi)}""")






def  A_(      A = 1000 ):
	UpperCAmelCase_		    =  0
	for i in range(A ):
		if i % 3 == 0 or i % 5 == 0:
			result += i
	return result


if __name__ == "__main__":
				print(f"{solution() = }")


