





"""simple docstring"""





def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		Union[str, Any]				,		SCREAMING_SNAKE_CASE	:		Optional[int]     ):







      '''simple docstring'''




      lowerCAmelCase    		=			[0 for i in range(r + 1     )]
      # nc0 = 1
      lowerCAmelCase    		=			1
      for i in range(1				,		n + 1     ):
            # to compute current row from previous row.
            lowerCAmelCase    		=			min(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
            while j > 0:
                  c[j] += c[j - 1]
                  j -= 1
      return c[r]






print(binomial_coefficient(n=10, r=5))













"""simple docstring"""





from math import log

from scipy.constants import Boltzmann, physical_constants

SCREAMING_SNAKE_CASE__   =  300  # TEMPERATURE (unit = K)


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		float				,		SCREAMING_SNAKE_CASE	:		float				,		SCREAMING_SNAKE_CASE	:		float				,		):







      '''simple docstring'''




      if donor_conc <= 0:
            raise ValueError("""Donor concentration should be positive"""     )
      elif acceptor_conc <= 0:
            raise ValueError("""Acceptor concentration should be positive"""     )
      elif intrinsic_conc <= 0:
            raise ValueError("""Intrinsic concentration should be positive"""     )
      elif donor_conc <= intrinsic_conc:
            raise ValueError(
                """Donor concentration should be greater than intrinsic concentration"""     )
      elif acceptor_conc <= intrinsic_conc:
            raise ValueError(
                """Acceptor concentration should be greater than intrinsic concentration"""     )
      else:
            return (
                Boltzmann
                * T
                * log((donor_conc * acceptor_conc) / intrinsic_conc**2     )
                / physical_constants["electron volt"][0]
            )


if __name__ == "__main__":
       import doctest

       doctest.testmod()






