





from __future__ import annotations




def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	)       ->     float:







  if days_between_payments <= 0:
    raise ValueError('days_between_payments must be > 0'	)
  if daily_interest_rate < 0:
    raise ValueError('daily_interest_rate must be >= 0'	)
  if principal <= 0:
    raise ValueError('principal must be > 0'	)
  return principal * daily_interest_rate * days_between_payments




def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		)       ->     float:







  if number_of_compounding_periods <= 0:
    raise ValueError('number_of_compounding_periods must be > 0'	)
  if nominal_annual_interest_rate_percentage < 0:
    raise ValueError('nominal_annual_interest_rate_percentage must be >= 0'	)
  if principal <= 0:
    raise ValueError('principal must be > 0'	)

  return principal * (
      (1 + nominal_annual_interest_rate_percentage) ** number_of_compounding_periods
      - 1
  )




def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		)       ->     float:







  if number_of_years <= 0:
    raise ValueError('number_of_years must be > 0'	)
  if nominal_annual_percentage_rate < 0:
    raise ValueError('nominal_annual_percentage_rate must be >= 0'	)
  if principal <= 0:
    raise ValueError('principal must be > 0'	)

  return compound_interest(
      __snake_case	,		nominal_annual_percentage_rate / 365	,		number_of_years * 365	)


if __name__ == "__main__":
      import doctest

      doctest.testmod()










from __future__ import annotations

import math
from collections.abc import Callable




def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE = 100	,		)       ->     float:
  lowercase__			    =						x_start
  lowercase__			    =						fnc(_SCREAMING_SNAKE_CASE	)
  lowercase__			    =						0.0

  for _ in range(_SCREAMING_SNAKE_CASE	):
    # Approximates curve as a sequence of linear lines and sums their length
    lowercase__			    =						(x_end - x_start) / steps + xa
    lowercase__			    =						fnc(_SCREAMING_SNAKE_CASE	)
    length += math.hypot(xa - xa	,		fxa - fxa	)

    # Increment step
    lowercase__			    =						xa
    lowercase__			    =						fxa

  return length


if __name__ == "__main__":




      def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	)       ->     str:
        return math.sin(10 * x	)

      print("""f(x) = sin(10 * x)""")
      print("""The length of the curve from x = -10 to x = 10 is:""")
      lowercase_					     =	10
      while i <= 100_000:
            print(f'''With {i} steps: {line_length(f, -10, 10, i)}''')
            i *= 10


