"""simple docstring"""
from math import factorial, pi







def 						__a   (	_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE = 30   )	->float:

  if not isinstance(_SCREAMING_SNAKE_CASE		,     (int, float)   ):
    raise ValueError('maclaurin_sin() requires either an int or float for theta'   )

  if not isinstance(_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE   ) or accuracy <= 0:
    raise ValueError('maclaurin_sin() requires a positive int for accuracy'   )

  a__:     int										=	float(_SCREAMING_SNAKE_CASE   )
  a__:     int										=	theta // (2 * pi)
  theta -= 2 * div * pi
  return sum(
      (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1   ) for r in range(_SCREAMING_SNAKE_CASE   )   )







def 						__a   (	_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE = 30   )	->float:

  if not isinstance(_SCREAMING_SNAKE_CASE		,     (int, float)   ):
    raise ValueError('maclaurin_cos() requires either an int or float for theta'   )

  if not isinstance(_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE   ) or accuracy <= 0:
    raise ValueError('maclaurin_cos() requires a positive int for accuracy'   )

  a__:     Dict										=	float(_SCREAMING_SNAKE_CASE   )
  a__:     List[Any]										=	theta // (2 * pi)
  theta -= 2 * div * pi
  return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r   ) for r in range(_SCREAMING_SNAKE_CASE   )   )


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 print(maclaurin_sin(10))
 print(maclaurin_sin(-10))
 print(maclaurin_sin(10, 15))
 print(maclaurin_sin(-10, 15))

 print(maclaurin_cos(5))
 print(maclaurin_cos(-5))
 print(maclaurin_cos(10, 15))
 print(maclaurin_cos(-10, 15))



"""simple docstring"""
def 						__a   (	_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE = False   )	->str:

  if not isinstance(_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE   ):
    a__:     Optional[int]										=	F'Expected string as input, found {type(_SCREAMING_SNAKE_CASE   )}'
    raise ValueError(_SCREAMING_SNAKE_CASE   )
  if not isinstance(_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE   ):
    a__:     List[str]										=	F'Expected boolean as use_pascal parameter, found {type(_SCREAMING_SNAKE_CASE   )}'
    raise ValueError(_SCREAMING_SNAKE_CASE   )

  a__:     int										=	input_str.split('_'   )

  a__:     List[str]										=	0 if use_pascal else 1

  a__:     List[str]										=	words[start_index:]

  a__:     List[str]										=	[word[0].upper() + word[1:] for word in words_to_capitalize]

  a__:     List[str]										=	'' if use_pascal else words[0]

  return "".join([initial_word, *capitalized_words]   )


if __name__ == "__main__":
 from doctest import testmod

 testmod()


