
def      _a     (   __UpperCamelCase       :  list	,__UpperCamelCase       :  int    ):
			for index, item in enumerate(__UpperCamelCase    ):
						if item == target:
									return index
			return -1



def      _a     (   __UpperCamelCase       :  list	,__UpperCamelCase       :  int	,__UpperCamelCase       :  int	,__UpperCamelCase       :  int    ):
			if not (0 <= high < len(__UpperCamelCase    ) and 0 <= low < len(__UpperCamelCase    )):
						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(__UpperCamelCase	,low + 1	,high - 1	,__UpperCamelCase    )


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

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





import numpy as np
from numpy import floataa
from numpy.typing import NDArray



def      _a     (   __UpperCamelCase       :  NDArray[floataa]	,__UpperCamelCase       :  NDArray[floataa]    ):
			lowerCAmelCase__      ,				lowerCAmelCase__ :    Any				      =			np.shape(__UpperCamelCase    )

			lowerCAmelCase__ :    NDArray[floataa]				      =			np.zeros((rows, 1)	,dtype=__UpperCamelCase    )
			for row in reversed(range(__UpperCamelCase    )    ):
						lowerCAmelCase__ :    List[str]				      =			0
						for col in range(row + 1	,__UpperCamelCase    ):
									total += coefficients[row, col] * x[col]

						lowerCAmelCase__ :    int				      =			(vector[row] - total) / coefficients[row, row]

			return x



def      _a     (   __UpperCamelCase       :  NDArray[floataa]	,__UpperCamelCase       :  NDArray[floataa]    ):
			lowerCAmelCase__      ,				lowerCAmelCase__ :    str				      =			np.shape(__UpperCamelCase    )
			if rows != columns:
						return np.array(()	,dtype=__UpperCamelCase    )

			# augmented matrix
			lowerCAmelCase__ :    NDArray[floataa]				      =			np.concatenate((coefficients, vector)	,axis=1    )
			lowerCAmelCase__ :    List[str]				      =			augmented_mat.astype('''float64'''    )

			# scale the matrix leaving it triangular
			for row in range(rows - 1    ):
						lowerCAmelCase__ :    str				      =			augmented_mat[row, row]
						for col in range(row + 1	,__UpperCamelCase    ):
									lowerCAmelCase__ :    Optional[int]				      =			augmented_mat[col, row] / pivot
									augmented_mat[col, :] -= factor * augmented_mat[row, :]

			lowerCAmelCase__ :    int				      =			retroactive_resolution(
			    augmented_mat[:, 0:columns]	,augmented_mat[:, columns : columns + 1]    )

			return x


if __name__ == "__main__":
							import doctest

							doctest.testmod()



