<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Assignment 2
Implement the search algorithm you came up with in pseudocode with Python
Test the search algorithm with a list of 10,100,1000 random numbers (sorted with your sorting algorithm) and compare the result using the %time to time your code and submit your results in code comments
Pseudocode
Get a sorted list and a search term. 
Loop through the sorted list
Step1:  The algorithm
Step2:  Testing the algorithm
Step3:  Result of %time
<ASSISTANT_TASK:>
Python Code:
import random
Explanation: Assignment 2
Implement the search algorithm you came up with in pseudocode with Python
Test the search algorithm with a list of 10,100,1000 random numbers (sorted with your sorting algorithm) and compare the result using the %time to time your code and submit your results in code comments
Pseudocode
Get a sorted list and a search term. 
Loop through the sorted list:
Compare the item to the search term.
If the search term matches the item:
    return the couter value
Add one to the counter
End of explanation
# Simple brute force search engine
def ownsearch(sorted_list, search_term):
    counter = 0
    for i in sorted_list:
        if search_term == i:
            return "I found the term " + str(search_term) + " the first time at index " + str(counter)
        counter += 1
sorted_list = ['Alma', 'Annus', 'Mater', 'mirabilis']
search_term = 'Mater'
print(ownsearch(sorted_list,search_term))
Explanation: The algorithm
End of explanation
# The algorithm from the previous assignment
def ownsort(int_list):
    for i in range(len(int_list) - 1):
        k = i
        for j in range(i + 1, len(int_list)):
            if int_list[j] < int_list[k]:
                k = j
        int_list[i], int_list[k] = int_list[k], int_list[i]
    return int_list
# Generate Lists with Random numbers 
int_list_10 = []
for i in range(0,10):
    int_list_10.append(random.randint(1,100))
int_list_100 = []
for i in range(0,100):
    int_list_100.append(random.randint(1,100))
int_list_1000 = []
for i in range(0,1000):
    int_list_1000.append(random.randint(1,100))
# Generating random int for search term
search_term = random.randint(1,100)
# Generating sorted list
int_list_10 = ownsort(int_list_10)
print(ownsearch(int_list_10, search_term))
%time
Explanation: Testing the algorithm
End of explanation
# Generating random int for search term
search_term = random.randint(1,100)
# Generating sorted list
int_list_100 = ownsort(int_list_100)
print(ownsearch(int_list_100, search_term))
%time
Result of %time:
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 5.72 µs
# Generating random int for search term
search_term = random.randint(1,100)
# Generating sorted list
int_list_1000 = ownsort(int_list_1000)
print(ownsearch(int_list_1000, search_term))
%time
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 5.01 µs
Explanation: Result of %time:
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 5.01 µs
End of explanation
<END_TASK>