'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       float:
    if discount_rate < 0:
        raise ValueError('''Discount rate cannot be negative'''							)
    if not cash_flows:
        raise ValueError('''Cash flows list cannot be empty'''							)
    __lowerCamelCase            =    sum(
        cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(UpperCamelCase__							)							)
    return round(UpperCamelCase__							,    ndigits=2							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()

'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       float:
    if digit_amount > 0:
        return round(number - int(UpperCamelCase__							)							,    UpperCamelCase__							)
    return number - int(UpperCamelCase__							)


if __name__ == "__main__":
  print(decimal_isolate(1.53, 0))
  print(decimal_isolate(35.345, 1))
  print(decimal_isolate(35.345, 2))
  print(decimal_isolate(35.345, 3))
  print(decimal_isolate(-14.789, 3))
  print(decimal_isolate(0, 2))
  print(decimal_isolate(-14.123, 1))
  print(decimal_isolate(-14.123, 2))
  print(decimal_isolate(-14.123, 3))
