






'''simple docstring'''

def 					lowercase__				(   __UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase	,		)->				float:
      UpperCamelCase       						=      [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:
            UpperCamelCase       						=      1 - (matter_density + radiation_density + dark_energy)

            UpperCamelCase       						=      (
                radiation_density * (redshift + 1) ** 4
                + matter_density * (redshift + 1) ** 3
                + curvature * (redshift + 1) ** 2
                + dark_energy
            )

            UpperCamelCase       						=      hubble_constant * e_a ** (1 / 2)
            return hubble


if __name__ == "__main__":
     import doctest

     # run doctest
     doctest.testmod()

     # demo LCDM approximation
     SCREAMING_SNAKE_CASE__											=     0.3

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








'''simple docstring'''

def 					lowercase__				(   __UpperCamelCase					)->				str:
      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"""					)
      UpperCamelCase       						=      """"""
      while len(__UpperCamelCase					) % 3 != 0:
            UpperCamelCase       						=      """0""" + bin_string
      UpperCamelCase       						=      [
          bin_string[index : index + 3]
          for index in range(len(__UpperCamelCase					)					)
          if index % 3 == 0
      ]
      for bin_group in bin_string_in_3_list:
            UpperCamelCase       						=      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()
