



'''simple docstring'''



def      _A				(      _lowerCAmelCase    ):



							"""simple docstring"""



							if not all(char in '01' for char in bin_string    ):
														raise ValueError('Non-binary value was passed to the function'    )
							if not bin_string:
														raise ValueError('Empty string was passed to the function'    )
							__lowercase						=""
							while len(_UpperCAmelCase    ) % 3 != 0:
														__lowercase						="0" + bin_string
							__lowercase						=[
							    bin_string[index : index + 3]
							    for index in range(len(_UpperCAmelCase    )    )
							    if index % 3 == 0
							]
							for bin_group in bin_string_in_3_list:
														__lowercase						=0
														for index, val in enumerate(_UpperCAmelCase    ):
																					oct_val += int(2 ** (2 - index) * int(_UpperCAmelCase    )    )
														oct_string += str(_UpperCAmelCase    )
							return oct_string


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

		testmod()






def 			A_      (    _UpperCAmelCase				,	_UpperCAmelCase				,	_UpperCAmelCase				,	_UpperCAmelCase				,	_UpperCAmelCase				,	):
						SCREAMING_SNAKE_CASE_: Optional[int]  		=       [redshift, radiation_density, matter_density, dark_energy]
						if any(p < 0 for p in parameters    ):
												raise ValueError("All input parameters must be positive"    )

						if any(p > 1 for p in parameters[1:4]    ):
												raise ValueError("Relative densities cannot be greater than one"    )
						else:
												SCREAMING_SNAKE_CASE_: int  		=       1 - (matter_density + radiation_density + dark_energy)

												SCREAMING_SNAKE_CASE_: Dict  		=       (
												    radiation_density * (redshift + 1) ** 4
												    + matter_density * (redshift + 1) ** 3
												    + curvature * (redshift + 1) ** 2
												    + dark_energy
												)

												SCREAMING_SNAKE_CASE_: Any  		=       hubble_constant * e_a ** (1 / 2)
												return hubble


if __name__ == "__main__":
						import doctest

						# run doctest
						doctest.testmod()

						# demo LCDM approximation
						lowerCAmelCase							:  List[Any]   	=						0.3

						print(
						    hubble_parameter(
						        hubble_constant=68.3,
						        radiation_density=1E-4,
						        matter_density=matter_density,
						        dark_energy=1 - matter_density,
						        redshift=0,
						    )
						)






