"""simple docstring"""







from __future__ import annotations

__SCREAMING_SNAKE_CASE    	=1.6021E-19  # units = C



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     float     ,			__SCREAMING_SNAKE_CASE							:     float     ,			__SCREAMING_SNAKE_CASE							:     float     ,			):
     if (conductivity, electron_conc, mobility).count(0      ) != 1:
          raise ValueError('You cannot supply more or less than 2 values'      )
     elif conductivity < 0:
          raise ValueError('Conductivity cannot be negative'      )
     elif electron_conc < 0:
          raise ValueError('Electron concentration cannot be negative'      )
     elif mobility < 0:
          raise ValueError('mobility cannot be negative'      )
     elif conductivity == 0:
          return (
              "conductivity",
              mobility * electron_conc * ELECTRON_CHARGE,
          )
     elif electron_conc == 0:
          return (
              "electron_conc",
              conductivity / (mobility * ELECTRON_CHARGE),
          )
     else:
          return (
              "mobility",
              conductivity / (electron_conc * ELECTRON_CHARGE),
          )


if __name__ == "__main__":
       import doctest

       doctest.testmod()


"""simple docstring"""







from __future__ import annotations

import math
from collections.abc import Callable



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     Callable[[int | float], int | float]     ,			__SCREAMING_SNAKE_CASE							:     int | float     ,			__SCREAMING_SNAKE_CASE							:     int | float     ,			__SCREAMING_SNAKE_CASE							:     int = 1_00     ,			):
     lowercase_	:				Dict													=	x_start
     lowercase_	:				Optional[Any]													=	fnc(__SCREAMING_SNAKE_CASE      )
     lowercase_	:				Optional[Any]													=	0.0

     for _ in range(__SCREAMING_SNAKE_CASE      ):
          # Approximates curve as a sequence of linear lines and sums their length
          lowercase_	:				Union[str, Any]													=	(x_end - x_start) / steps + xa
          lowercase_	:				str													=	fnc(__SCREAMING_SNAKE_CASE      )
          length += math.hypot(xa - xa     ,			fxa - fxa      )

          # Increment step
          lowercase_	:				List[Any]													=	xa
          lowercase_	:				Optional[Any]													=	fxa

     return length


if __name__ == "__main__":



       def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     Any      ):
            return math.sin(10 * x      )

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

