
from __future__ import annotations

# This is the precision for this function which can be altered.
# It is recommended for users to keep this number greater than or equal to 10.
SCREAMING_SNAKE_CASE							:Tuple										=    10


def 						UpperCAmelCase      (     a_		,       a_		,       a_		,       a_						)		->     int:







				"""simple docstring"""



				for i in range(a_		,       a_						):
								if array[i] == target:
												return i
				return -1


def 						UpperCAmelCase      (     a_		,       a_						)		->     int:







				"""simple docstring"""



				__A             =			0
				__A             =			len(a_						)
				while left <= right:
								if right - left < precision:
												return lin_search(a_		,       a_		,       a_		,       a_						)

								__A             =			(left + right) // 3 + 1
								__A             =			2 * (left + right) // 3 + 1

								if array[one_third] == target:
												return one_third
								elif array[two_third] == target:
												return two_third

								elif target < array[one_third]:
												__A             =			one_third - 1
								elif array[two_third] < target:
												__A             =			two_third + 1

								else:
												__A             =			one_third + 1
												__A             =			two_third - 1
				else:
								return -1


def 						UpperCAmelCase      (     a_		,       a_		,       a_		,       a_						)		->     int:







				"""simple docstring"""



				if left < right:
								if right - left < precision:
												return lin_search(a_		,       a_		,       a_		,       a_						)
								__A             =			(left + right) // 3 + 1
								__A             =			2 * (left + right) // 3 + 1

								if array[one_third] == target:
												return one_third
								elif array[two_third] == target:
												return two_third

								elif target < array[one_third]:
												return rec_ternary_search(a_		,       one_third - 1		,       a_		,       a_						)
								elif array[two_third] < target:
												return rec_ternary_search(two_third + 1		,       a_		,       a_		,       a_						)
								else:
												return rec_ternary_search(one_third + 1		,       two_third - 1		,       a_		,       a_						)
				else:
								return -1


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					SCREAMING_SNAKE_CASE							:int										=    input('Enter numbers separated by comma:\n').strip()
					SCREAMING_SNAKE_CASE							:List[str]										=    [int(item.strip()) for item in user_input.split(',')]
					assert collection == sorted(collection), f"List must be ordered.\n{collection}."
					SCREAMING_SNAKE_CASE							:Optional[int]										=    int(input('Enter the number to be found in the list:\n').strip())
					SCREAMING_SNAKE_CASE							:List[str]										=    ite_ternary_search(collection, target)
					SCREAMING_SNAKE_CASE							:Dict										=    rec_ternary_search(0, len(collection) - 1, collection, target)
					if resulta != -1:
										print(f'''Iterative search: {target} found at positions: {resulta}''')
										print(f'''Recursive search: {target} found at positions: {resulta}''')
					else:
										print('Not found')


from math import log

from scipy.constants import Boltzmann, physical_constants

SCREAMING_SNAKE_CASE							:Dict										=    300  # TEMPERATURE (unit = K)


def 						UpperCAmelCase      (     a_		,       a_		,       a_		,       )		->     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()
