'''simple docstring'''


from doctest import testmod
from math import sqrt


def 					_lowerCamelCase    (      lowerCamelCase_					:							int   ):



     """simple docstring"""





     UpperCAmelCase_							:   list[int]   =      []
     if num < 1:
          return facs
     facs.append(1   )
     if num == 1:
          return facs
     facs.append(lowerCamelCase_   )
     for i in range(2	,     int(sqrt(lowerCamelCase_   )   ) + 1   ):
          if num % i == 0:  # If i is a factor of num
               facs.append(lowerCamelCase_   )
               UpperCAmelCase_							:   Optional[int]   =      num // i  # num//i is the other factor of num
               if d != i:  # If d and i are distinct
                    facs.append(lowerCamelCase_   )  # we have found another factor
     facs.sort()
     return facs


if __name__ == "__main__":
 testmod(name='''factors_of_a_number''', verbose=True)







'''simple docstring'''


def 					_lowerCamelCase    (      lowerCamelCase_					:							str   ):



     """simple docstring"""





     UpperCAmelCase_							:   str   =      str(lowerCamelCase_   ).strip()
     if not oct_string:
          raise ValueError('Empty string was passed to the function'   )
     UpperCAmelCase_							:   Tuple   =      oct_string[0] == '-'
     if is_negative:
          UpperCAmelCase_							:   Tuple   =      oct_string[1:]
     if not oct_string.isdigit() or not all(0 <= int(lowerCamelCase_   ) <= 7 for char in oct_string   ):
          raise ValueError('Non-octal value was passed to the function'   )
     UpperCAmelCase_							:   str   =      0
     for char in oct_string:
          UpperCAmelCase_							:   List[Any]   =      8 * decimal_number + int(lowerCamelCase_   )
     if is_negative:
          UpperCAmelCase_							:   List[Any]   =      -decimal_number
     return decimal_number


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

 testmod()






