





'''simple docstring'''

def lowerCamelCase						(					__lowerCamelCase			:   int ,	__lowerCamelCase			:   List[str]   )						->int:
    for index, item in enumerate(A__   ):
        if item == target:
            return index
    return -1





def lowerCamelCase						(					__lowerCamelCase			:   Tuple ,	__lowerCamelCase			:   Union[str, Any] ,	__lowerCamelCase			:   List[Any] ,	__lowerCamelCase			:   int   )						->int:
    if not (0 <= high < len(A__   ) and 0 <= low < len(A__   )):
        raise Exception("""Invalid upper or lower bound!"""   )
    if high < low:
        return -1
    if sequence[low] == target:
        return low
    if sequence[high] == target:
        return high
    return rec_linear_search(A__ ,	low + 1 ,	high - 1 ,	A__   )


if __name__ == "__main__":
      lowercase_         =			input("""Enter numbers separated by comma:\n""").strip()
      lowercase_         =			[int(item.strip()) for item in user_input.split(""",""")]

      lowercase_         =			int(input("""Enter a single number to be found in the list:\n""").strip())
      lowercase_         =			linear_search(sequence, target)
      if result != -1:
            print(f"""linear_search({sequence}, {target}) = {result}""")
      else:
            print(f"""{target} was not found in {sequence}""")










'''simple docstring'''

import os
import sys
import time

from . import transposition_cipher as trans_cipher





def lowerCamelCase						(					)						->None:
    _SCREAMING_SNAKE_CASE     =      """Prehistoric Men.txt"""
    _SCREAMING_SNAKE_CASE     =      """Output.txt"""
    _SCREAMING_SNAKE_CASE     =      int(input("""Enter key: """   )   )
    _SCREAMING_SNAKE_CASE     =      input("""Encrypt/Decrypt [e/d]: """   )

    if not os.path.exists(__lowerCamelCase   ):
        print(F'File {input_file} does not exist. Quitting...'   )
        sys.exit()
    if os.path.exists(__lowerCamelCase   ):
        print(F'Overwrite {output_file}? [y/n]'   )
        _SCREAMING_SNAKE_CASE     =      input("""> """   )
        if not response.lower().startswith("""y"""   ):
            sys.exit()

    _SCREAMING_SNAKE_CASE     =      time.time()
    if mode.lower().startswith("""e"""   ):
        with open(__lowerCamelCase   ) as f:
            _SCREAMING_SNAKE_CASE     =      f.read()
        _SCREAMING_SNAKE_CASE     =      trans_cipher.encrypt_message(__lowerCamelCase ,	__lowerCamelCase   )
    elif mode.lower().startswith("""d"""   ):
        with open(__lowerCamelCase   ) as f:
            _SCREAMING_SNAKE_CASE     =      f.read()
        _SCREAMING_SNAKE_CASE     =      trans_cipher.decrypt_message(__lowerCamelCase ,	__lowerCamelCase   )

    with open(__lowerCamelCase ,	"""w"""   ) as output_obj:
        output_obj.write(__lowerCamelCase   )

    _SCREAMING_SNAKE_CASE     =      round(time.time() - start_time ,	2   )
    print(("""Done (""", total_time, """seconds )""")   )


if __name__ == "__main__":
      main()



