





"""simple docstring"""


import math




def        lowercase__     (       lowercase_		,lowercase_      )       ->		float:




      """simple docstring"""

      if (
          not isinstance(lowercase_		,(int, float)      )
          or power_factor < -1
          or power_factor > 1
      ):
            raise ValueError("power_factor must be a valid float value between -1 and 1."      )
      return apparent_power * power_factor




def        lowercase__     (       lowercase_		,lowercase_      )       ->		float:




      """simple docstring"""

      if (
          not isinstance(lowercase_		,(int, float)      )
          or power_factor < -1
          or power_factor > 1
      ):
            raise ValueError("power_factor must be a valid float value between -1 and 1."      )
      return apparent_power * math.sqrt(1 - power_factor**2      )


if __name__ == "__main__":
  import doctest

  doctest.testmod()







"""simple docstring"""


import re




def        lowercase__     (       lowercase_      )       ->		bool:




      """simple docstring"""

      _UpperCamelCase   :						List[Any]    =							re.compile(
          r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"      )

      return bool(re.search(lowercase_		,lowercase_      )      )


if __name__ == "__main__":
  lowerCamelCase__						= "0094702343221"

  print(is_sri_lankan_phone_number(phone))
