






'''simple docstring'''




def       __UpperCAmelCase						(  lowerCamelCase_)							->     int:
		UpperCamelCase__				:					Optional[int]					=					[]
		UpperCamelCase__				:					Tuple					=					set({'(', '[', '{'})
		UpperCamelCase__				:					Dict					=					set({')', ']', '}'})
		UpperCamelCase__				:					Optional[Any]					=					{'{': '}', '[': ']', '(': ')'}

		for i in range(len(lowerCamelCase_)):
				if s[i] in open_brackets:
						stack.append(s[i])

				elif s[i] in closed_brackets and (
				    len(lowerCamelCase_) == 0 or (len(lowerCamelCase_) > 0 and open_to_closed[stack.pop()] != s[i])
				):
						return False

		return len(lowerCamelCase_) == 0







def       __UpperCAmelCase						(  )							->     Optional[int]:
		UpperCamelCase__				:					List[str]					=					input('Enter sequence of brackets: ')
		if is_balanced(lowerCamelCase_):
				print(lowerCamelCase_     ,      'is balanced')
		else:
				print(lowerCamelCase_     ,      'is not balanced')


if __name__ == "__main__":
		main()












'''simple docstring'''




from math import log

from scipy.constants import Boltzmann, physical_constants

lowerCAmelCase__          =						300  # TEMPERATURE (unit = K)







def       __UpperCAmelCase						(  lowerCamelCase_     ,      lowerCamelCase_     ,      lowerCamelCase_     ,      )							->     float:

		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()




