"""simple docstring"""







def      __lowerCAmelCase(		__UpperCAmelCase = 10     ,__UpperCAmelCase = 1_000     ,__UpperCAmelCase = True			):






	"""simple docstring"""





	assert (
	    isinstance(__UpperCAmelCase     ,__UpperCAmelCase			)
	    and isinstance(__UpperCAmelCase     ,__UpperCAmelCase			)
	    and isinstance(__UpperCAmelCase     ,__UpperCAmelCase			)
	), "Invalid type of value(s) specified to function!"

	if min_val > max_val:
		raise ValueError('Invalid value for min_val or max_val (min_value < max_value)'			)
	return min_val if option else max_val


def      __lowerCAmelCase(		__UpperCAmelCase     ,__UpperCAmelCase			):






	"""simple docstring"""





	return int((number_a + number_a) / 2			)


def      __lowerCAmelCase(		__UpperCAmelCase     ,__UpperCAmelCase     ,__UpperCAmelCase			):






	"""simple docstring"""





	assert (
	    isinstance(__UpperCAmelCase     ,__UpperCAmelCase			) and isinstance(__UpperCAmelCase     ,__UpperCAmelCase			) and isinstance(__UpperCAmelCase     ,__UpperCAmelCase			)
	), 'argument values must be type of "int"'

	if lower > higher:
		raise ValueError('argument value for lower and higher must be(lower > higher)'			)

	if not lower < to_guess < higher:
		raise ValueError(
		    'guess value must be within the range of lower and higher value'			)

	def answer(__UpperCAmelCase			) -> str:
		if number > to_guess:
			return "high"
		elif number < to_guess:
			return "low"
		else:
			return "same"

	print('started...'			)

	_lowercase :    Tuple							=							lower
	_lowercase :    Dict							=							higher

	_lowercase :    Optional[Any]							=							[]

	while True:
		_lowercase :    str							=							get_avg(__UpperCAmelCase     ,__UpperCAmelCase			)
		last_numbers.append(__UpperCAmelCase			)

		if answer(__UpperCAmelCase			) == "low":
			_lowercase :    List[Any]							=							number
		elif answer(__UpperCAmelCase			) == "high":
			_lowercase :    Dict							=							number
		else:
			break

	print(F'''guess the number : {last_numbers[-1]}'''			)
	print(F'''details : {last_numbers!s}'''			)


def      __lowerCAmelCase(		):






	"""simple docstring"""





	_lowercase :    Any							=							int(input('Enter lower value : '			).strip()			)
	_lowercase :    str							=							int(input('Enter high value : '			).strip()			)
	_lowercase :    List[Any]							=							int(input('Enter value to guess : '			).strip()			)
	guess_the_number(__UpperCAmelCase     ,__UpperCAmelCase     ,__UpperCAmelCase			)


if __name__ == "__main__":
						main()




"""simple docstring"""







import math


def      __lowerCAmelCase(		__UpperCAmelCase			):






	"""simple docstring"""





	if not isinstance(__UpperCAmelCase     ,__UpperCAmelCase			):
		_lowercase :    List[Any]							=							F'''Input value of [number={number}] must be an integer'''
		raise TypeError(__UpperCAmelCase			)

	if number < 1:
		_lowercase :    List[Any]							=							F'''Input value of [number={number}] must be > 0'''
		raise ValueError(__UpperCAmelCase			)
	elif number == 1:
		return 3
	elif number == 2:
		return 5
	else:
		_lowercase :    str							=							int(math.log(number // 3     ,2			)			) + 2

		_lowercase :    Union[str, Any]							=							[3, 5]
		_lowercase :    Optional[int]							=							2
		_lowercase :    List[Any]							=							3
		for block in range(1     ,__UpperCAmelCase			):
			for _ in range(__UpperCAmelCase			):
				proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1]			)
				proth_index += 1
			increment *= 2

	return proth_list[number - 1]


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						for number in range(11):
												SCREAMING_SNAKE_CASE									=						0
												try:
																		SCREAMING_SNAKE_CASE									=						proth(number)
												except ValueError:
																		print(f"""ValueError: there is no {number}th Proth number""")
																		continue

												print(f"""The {number}th Proth number: {value}""")



