





"""simple docstring"""




import os
import sys
import time

from . import transposition_cipher as trans_cipher





def 			a_							(				):
						_UpperCamelCase     :   Dict      =       '''Prehistoric Men.txt'''
						_UpperCamelCase     :   Optional[Any]      =       '''Output.txt'''
						_UpperCamelCase     :   Any      =       int(input('''Enter key: '''  )  )
						_UpperCamelCase     :   Optional[Any]      =       input('''Encrypt/Decrypt [e/d]: '''  )

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

						_UpperCamelCase     :   List[str]      =       time.time()
						if mode.lower().startswith('''e'''  ):
												with open(_lowercase  ) as f:
																		_UpperCamelCase     :   Optional[int]      =       f.read()
												_UpperCamelCase     :   List[str]      =       trans_cipher.encrypt_message(_lowercase			,		_lowercase  )
						elif mode.lower().startswith('''d'''  ):
												with open(_lowercase  ) as f:
																		_UpperCamelCase     :   Dict      =       f.read()
												_UpperCamelCase     :   Any      =       trans_cipher.decrypt_message(_lowercase			,		_lowercase  )

						with open(_lowercase			,		'''w'''  ) as output_obj:
												output_obj.write(_lowercase  )

						_UpperCamelCase     :   List[str]      =       round(time.time() - start_time			,		2  )
						print(('''Done (''', total_time, '''seconds )''')  )


if __name__ == "__main__":
						main()





def 						A_			(				snake_case				: Union[str, Any]			,   snake_case				: Dict			)   ->     Dict:



						'''simple docstring'''

						__UpperCamelCase  	=      (boundary[1] - boundary[0]) / steps
						__UpperCamelCase  	=      boundary[0]
						__UpperCamelCase  	=      boundary[1]
						__UpperCamelCase  	=      make_points(snake_case			,   snake_case			,   snake_case			)
						__UpperCamelCase  	=      0.0
						y += (h / 3.0) * f(snake_case			)
						__UpperCamelCase  	=      2
						for i in x_i:
												y += (h / 3) * (4 - 2 * (cnt % 2)) * f(snake_case			)
												cnt += 1
						y += (h / 3.0) * f(snake_case			)
						return y




def 						A_			(				snake_case				: str			,   snake_case				: Optional[int]			,   snake_case				: Any			)   ->     Optional[int]:



						'''simple docstring'''

						__UpperCamelCase  	=      a + h
						while x < (b - h):
												yield x
												__UpperCamelCase  	=      x + h




def 						A_			(				snake_case				: Union[str, Any]			)   ->     str:  # enter your function here



						'''simple docstring'''

						__UpperCamelCase  	=      (x - 0) * (x - 0)
						return y




def 						A_			(				)   ->     Dict:



						'''simple docstring'''

						__UpperCamelCase  	=      0.0  # Lower bound of integration
						__UpperCamelCase  	=      1.0  # Upper bound of integration
						__UpperCamelCase  	=      10.0  # define number of steps or resolution
						__UpperCamelCase  	=      [a, b]  # define boundary of integration
						__UpperCamelCase  	=      method_a(snake_case			,   snake_case			)
						print(f"y = {y}"			)


if __name__ == "__main__":
				main()




