I added three arguments to take my parameter: list, the length of the list and what you are searching in the list.
def LinearSearch(array, targetNumber): for i in range (0,5): array[i] == targetNumber: print("The number %d does exist in the list." %(targetNumber)) array[i] != targetNumber: print("The number %d does not exist in the list." %(targetNumber)) import random random_number =  for l in range (0,5): random_number.append(random.randint(1,100)) # Algorithm Sort for i in range(0, 5): for j in range (5-1, -1, -1): if random_number[j] < random_number[j-1]: new_value = random_number[j-1] random_number[j-1] = random_number[j] random_number[j] = new_value if j == 1: break
Here is the code, very inefficient and still working own it.