






"""simple docstring"""


from math import factorial, pi




def     snake_case						(A_   :float			,    A_   :int = 3_0   ):







  '''simple docstring'''

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

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

  a  :    str       =     float(A_   )
  a  :    Optional[int]       =     theta // (2 * pi)
  theta -= 2 * div * pi
  return sum(
      (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1   ) for r in range(A_   )   )




def     snake_case						(A_   :float			,    A_   :int = 3_0   ):







  '''simple docstring'''

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

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

  a  :    Union[str, Any]       =     float(A_   )
  a  :    Optional[int]       =     theta // (2 * pi)
  theta -= 2 * div * pi
  return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r   ) for r in range(A_   )   )


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"""


from __future__ import annotations




def     snake_case						(A_   :float			,    A_   :float			,    A_   :float   ):







  '''simple docstring'''

  if (voltage, current, resistance).count(0   ) != 1:
    raise ValueError('One and only one argument must be 0'   )
  if resistance < 0:
    raise ValueError('Resistance cannot be negative'   )
  if voltage == 0:
    return {"voltage": float(current * resistance   )}
  elif current == 0:
    return {"current": voltage / resistance}
  elif resistance == 0:
    return {"resistance": voltage / current}
  else:
    raise ValueError('Exactly one argument must be 0'   )


if __name__ == "__main__":
   import doctest

   doctest.testmod()




