



"""simple docstring"""
def    __magic_name__ (							lowercase							,	lowercase       ):





   if discount_rate < 0:
      raise ValueError("""Discount rate cannot be negative"""       )
   if not cash_flows:
      raise ValueError("""Cash flows list cannot be empty"""       )
   SCREAMING_SNAKE_CASE_:       Optional[Any]   	=sum(
       cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(lowercase       )       )
   return round(lowercase							,	ndigits=2       )


if __name__ == "__main__":
   import doctest

   doctest.testmod()








'''simple docstring'''





from maths.prime_factors import prime_factors
def    _SCREAMING_SNAKE_CASE  (       UpperCamelCase			):



    """simple docstring"""





    if not isinstance(UpperCamelCase							,    UpperCamelCase			):
        lowerCAmelCase__ :  int							      =					f"""Input value of [number={number}] must be an integer"""
        raise TypeError(UpperCamelCase			)
    if number < 1:
        raise ValueError("""Input must be a positive integer"""			)
    return -1 if len(prime_factors(UpperCamelCase			)			) % 2 else 1


if __name__ == "__main__":
 import doctest

 doctest.testmod()


