<jupyter_start><jupyter_text>Sequential Search  For an unordered list (item is present) Best case - 1 Worst case - n Average case - (n/2) For an unordered list (item is absent) Best case - n Worst case - n Average case - n  For an ordered List (item is present) Best case - 1 Worst case - n Average case - (n/2) For an ordered List (item is absent) Best case - 1 Worst case - n Average case - (n/2)<jupyter_code>def seq_s(arr,ele):
    pos = 0
    flag = 0
    for i in range(len(arr)):
        if arr[i] == ele:
            flag = 1
            pos = i
            break
        else:
            flag = 0
    if flag == 1:
        return "Element found at array index ",pos
    else:
        return "Element is not present in the array"

seq_s([1,2,3,4,5,6,7,8],9)
seq_s([1,2,3,4,5,6,7,8],8)
def ord_seq_s(arr,ele):
    pos = 0
    flag = 0
    
    for i in range(len(arr)):
        if arr[i] == ele:
            flag = 1
            pos = i
            break
        else:
            if arr[i] > ele:
                flag = 1
            else:
                flag = 0
    if flag == 1:
        return "Element found at array index ",pos
    else:
        return "Element is not present in the array"

            
    

ord_seq_s([1,2,3,4,5,6,7,8],8)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10808709175738725, 'fraction_numerical': 0.03421461897356143, 'mean_word_length': 1.744136460554371, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '456533', 'license': 'CC0-1.0', 'n_tokens_mistral': 453, 'n_tokens_neox': 433, 'n_words': 154, 'path': 'DS_Algo/Searching/Sequential_Search.ipynb', 'repo_name': 'ShivamBhosale/100DaysOfCode_V2', 'size': '1286'}