




def       _SCREAMING_SNAKE_CASE      (							lowercase     :	int | float | str					):


      '''simple docstring'''



      try:
            lowerCamelCase_							=   float(lowercase					)
      except ValueError:
            raise ValueError('Please enter a valid number'					)
      lowerCamelCase_							=   decimal - int(lowercase					)
      if fractional_part == 0:
            return int(lowercase					), 1
      else:
            lowerCamelCase_							=   len(str(lowercase					).split('.'					)[1]					)
            lowerCamelCase_							=   int(decimal * (10**number_of_frac_digits)					)
            lowerCamelCase_							=   10**number_of_frac_digits
            lowerCamelCase_					,    lowerCamelCase_							=   denominator, numerator
            while True:
                  lowerCamelCase_							=   dividend % divisor
                  if remainder == 0:
                        break
                  lowerCamelCase_					,    lowerCamelCase_							=   divisor, remainder
            lowerCamelCase_					,    lowerCamelCase_							=   numerator / divisor, denominator / divisor
            return int(lowercase					), int(lowercase					)


if __name__ == "__main__":
 print(F"""{decimal_to_fraction(2) = }""")
 print(F"""{decimal_to_fraction(89.0) = }""")
 print(F"""{decimal_to_fraction('67') = }""")
 print(F"""{decimal_to_fraction('45.0') = }""")
 print(F"""{decimal_to_fraction(1.5) = }""")
 print(F"""{decimal_to_fraction('6.25') = }""")
 print(F"""{decimal_to_fraction('78td') = }""")









def       _SCREAMING_SNAKE_CASE      (							lowercase     :	str					):


      '''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'					)
      lowerCamelCase_							=   ''
      while len(lowercase					) % 3 != 0:
            lowerCamelCase_							=   '0' + bin_string
      lowerCamelCase_							=   [
          bin_string[index : index + 3]
          for index in range(len(lowercase					)					)
          if index % 3 == 0
      ]
      for bin_group in bin_string_in_3_list:
            lowerCamelCase_							=   0
            for index, val in enumerate(lowercase					):
                  oct_val += int(2 ** (2 - index) * int(lowercase					)					)
            oct_string += str(lowercase					)
      return oct_string


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

 testmod()



