





"""simple docstring"""





from __future__ import annotations


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  ,			UpperCAmelCase_  )						->dict[str, 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()






"""simple docstring"""





def       lowerCamelCase_       (   UpperCAmelCase_  )						->float:





  """simple docstring"""


  return 10 - x * x


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  )						->float:





  """simple docstring"""


  if equation(UpperCAmelCase_  ) * equation(UpperCAmelCase_  ) >= 0:
    raise ValueError('''Wrong space!'''  )

  __UpperCAmelCase    :						Tuple       =						a
  while (b - a) >= 0.01:
    # Find middle point
    __UpperCAmelCase    :						List[str]       =						(a + b) / 2
    # Check if middle point is root
    if equation(UpperCAmelCase_  ) == 0.0:
      break
    # Decide the side to repeat the steps
    if equation(UpperCAmelCase_  ) * equation(UpperCAmelCase_  ) < 0:
      __UpperCAmelCase    :						Union[str, Any]       =						c
    else:
      __UpperCAmelCase    :						str       =						c
  return c


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  print(bisection(-2, 5))
  print(bisection(0, 6))