




from math import factorial







def 			lowerCamelCase_		(       UpperCamelCase__				:      int ,     UpperCamelCase__				:      int ,     UpperCamelCase__				:      float      )     ->       float:





				"""simple docstring"""


				if successes > trials:
								raise ValueError('successes must be lower or equal to trials'      )
				if trials < 0 or successes < 0:
								raise ValueError('the function is defined for non-negative integers'      )
				if not isinstance(UpperCamelCase__ ,     UpperCamelCase__      ) or not isinstance(UpperCamelCase__ ,     UpperCamelCase__      ):
								raise ValueError('the function is defined for non-negative integers'      )
				if not 0 < prob < 1:
								raise ValueError('prob has to be in range of 1 - 0'      )
				__lowerCamelCase		       =    (prob**successes) * ((1 - prob) ** (trials - successes))
				# Calculate the binomial coefficient: n! / k!(n-k)!
				__lowerCamelCase		       =    float(factorial(UpperCamelCase__      )      )
				coefficient /= factorial(UpperCamelCase__      ) * factorial(trials - successes      )
				return probability * coefficient


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

					testmod()
					print("Probability of 2 successes out of 4 trails")
					print("with probability of 0.75 is:", end=" ")
					print(binomial_distribution(2, 4, 0.7_5))








from math import sqrt







def 			lowerCamelCase_		(       UpperCamelCase__				:      int      )     ->       bool:





				"""simple docstring"""


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

				# All primes number are in format of 6k +/- 1
				for i in range(5 ,     int(sqrt(UpperCamelCase__      ) + 1      ) ,     6      ):
								if number % i == 0 or number % (i + 2) == 0:
												return False
				return True







def 			lowerCamelCase_		(       UpperCamelCase__				:      int = 1_0001      )     ->       int:





				"""simple docstring"""


				__lowerCamelCase		       =    0
				__lowerCamelCase		       =    1
				while count != nth and number < 3:
								number += 1
								if is_prime(UpperCamelCase__      ):
												count += 1
				while count != nth:
								number += 2
								if is_prime(UpperCamelCase__      ):
												count += 1
				return number


if __name__ == "__main__":
					print(f'''{solution() = }''')


