





'''simple docstring'''

from __future__ import annotations







def 							UpperCAmelCase_    (	lowerCAmelCase_							):

				"""simple docstring"""






				lowercase         = len(lowerCAmelCase_							) // 2

				# choose the middle 3 elements
				lowercase         = lst[m - 1 : m + 2]

				# if middle element is peak
				if three[1] > three[0] and three[1] > three[2]:
								return three[1]

				# if increasing, recurse on right
				elif three[0] < three[2]:
								if len(lst[:m]							) == 2:
												m -= 1
								return peak(lst[m:]							)

				# decreasing
				else:
								if len(lst[:m]							) == 2:
												m += 1
								return peak(lst[:m]							)


if __name__ == "__main__":
			import doctest

			doctest.testmod()











'''simple docstring'''

__lowerCamelCase : str											=			8.314_4598







def 							UpperCAmelCase_    (	lowerCAmelCase_		,							lowerCAmelCase_							):

				"""simple docstring"""






				if temperature < 0:
								raise Exception("Temperature cannot be less than 0 K"							)
				if molar_mass <= 0:
								raise Exception("Molar mass cannot be less than or equal to 0 kg/mol"							)
				else:
								return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
			import doctest

			# run doctest
			doctest.testmod()

			# example
			__lowerCamelCase : Optional[Any]											=			300
			__lowerCamelCase : Tuple											=			28
			__lowerCamelCase : str											=			rms_speed_of_molecule(temperature, molar_mass)
			print(f"Vrms of Nitrogen gas at 300 K is {vrms} m/s")




