as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write an algorithm with pseudocode for searching through a list of numbers for a particular value.
user
algorithm searchlist (list, target_number): 

set index = 0
set found = false

while index < length of list and found = false:
    if list at index = target_number
        set found = true
    else
        increment index
    
if found = true
    print "number was found at index " + index
else
    print "number was not found"
assistant