<jupyter_start><jupyter_text>To check if the list is sorted or not!<jupyter_code>def isSorted(a):
    l = len(a)
    if l == 0 or l == 1:
        return True
    if a[0] > a[1]:
        return False
    
    smallerList = a[1:]
    isSmallerListSorted = isSorted(smallerList)
    if isSmallerListSorted:
        return True
    else:
        return False
def isSortedBetter(a, si):
    l = len(a)
    if si == l-1 or si == l:
        return True
    if a[si] > a[si+1]:
        return False
    isSmallerPartSorted = isSortedBetter(a, si+1)
    return isSmallerPartSorted
a = [1,2,3,4,5,6,7,8,9]
isSortedBetter(a, 0)<jupyter_output><empty_output><jupyter_text>Sum Of Array<jupyter_code>def sumArray(a):
    l = len(a)
    if l == 0:
        return 0
    if l == 1:
        return a[0]
    
    return a[0] + sumArray(a[1:])
a = [1,2,3,4,5]
print(sumArray(a))<jupyter_output>15<jupyter_text>Check Number in Array<jupyter_code>def checkNumber(arr, x):
    l = len(arr)
    if l == 0:
        return False
    if arr[0] == x:
        return True
    
    return checkNumber(arr[1:], x)
a = [1,2,3,4,5]
x = eval(input('Enter the number: '))
print(checkNumber(a, x))<jupyter_output>Enter the number: 1
True<jupyter_text>First Index of Number<jupyter_code>def firstNumber(arr, x):
    l = len(arr)
    if l == 0:
        return -1
    
    if arr[0] == x:
        return 0
    
    smallerList = arr[1:]
    smallerListOutput = firstNumber(smallerList, x)
    
    if smallerListOutput == -1:
        return -1
    else:
        return smallerListOutput + 1
def firstNumberBetter(arr, x, si):
    l = len(arr)
    if si == l:
        return -1
    
    if arr[si] == x:
        return si
    
    smallerListOutput = firstNumberBetter(arr, x, si+1)
    return smallerListOutput
arr = [1,2,3,4,5,6,7,8,9,7,8,1,2]
print(firstNumber(arr, 7))
print(firstNumberBetter(arr, 7, 0))<jupyter_output>6
6<jupyter_text>Last Index of Number<jupyter_code>def lastIndex(a, x):
    l = len(a)
    if l == 0:
        return -1
    
    smallerList = a[1:]
    smallerListOutput = lastIndex(smallerList, x)
    if smallerListOutput != -1:
        return smallerListOutput + 1
    else:
        if a[0] == x:
            return 0
        else:
            return -1
def lastIndexBetter(a, x, si):
    l = len(a)
    if si == l:
        return -1
    
    smallerListOutput = lastIndexBetter(a, x, si+1)
    if smallerListOutput != -1:
        return smallerListOutput
    else:
        if a[si] == x:
            return si
        else:
            return -1
arr = [1,2,3,4,5,6,7,8,9,7,8,1,2]
print(lastIndex(arr, 7))
print(lastIndexBetter(arr, 7, 0))<jupyter_output>9
9
{'fraction_non_alphanumeric': 0.12967863894139886, 'fraction_numerical': 0.03705103969754253, 'mean_word_length': 2.4498044328552804, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '547462', 'license': 'Apache-2.0', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1031, 'n_words': 246, 'path': 'Recursions/recursions_practice_1.ipynb', 'repo_name': 'jarvis-1805/DSAwithPYTHON', 'size': '2645'}