



"""simple docstring"""


from __future__ import annotations

def 			_lowerCAmelCase				(       lowercase_		,     lowercase_ = None		,     lowercase_ = None						):
						if start is None:
												UpperCAmelCase					=			0

						if end is None:
												UpperCAmelCase					=			len(lowercase_						) - 1

						if start >= end:
												return

						UpperCAmelCase					=			(start + end) // 2

						slowsort(lowercase_		,     lowercase_		,     lowercase_						)
						slowsort(lowercase_		,     mid + 1		,     lowercase_						)

						if sequence[end] < sequence[mid]:
												UpperCAmelCase				,   UpperCAmelCase					=			sequence[mid], sequence[end]

						slowsort(lowercase_		,     lowercase_		,     end - 1						)


if __name__ == "__main__":
				from doctest import testmod

				testmod()










"""simple docstring"""


import math

def 			_lowerCAmelCase				(       lowercase_						):
						assert isinstance(lowercase_		,     lowercase_						) and (
						    number >= 0
						), "'number' must been an int and positive"

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or not number % 2:
												# Negatives, 0, 1 and all even numbers are not primes
												return False

						UpperCAmelCase					=			range(3		,     int(math.sqrt(lowercase_						) + 1						)		,     2						)
						return not any(not number % i for i in odd_numbers						)






def 			_lowerCAmelCase				(       lowercase_		,     lowercase_=1		,     **lowercase_						):
						UpperCAmelCase					=			factor * value
						UpperCAmelCase					=			value

						while not is_prime(lowercase_						):
												value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

						if value == first_value_val:
												return next_prime(value + 1		,     **lowercase_						)
						return value





