Python 3: Create a Text File on Your Own
Implement the sequential (linear) search algorithm in Python 3 and use it to find any word in the words.txt file of Week 10 on C4. The user enters the word and the file name. These are sent as arguments to the sequential search function. The function opens the file. The function returns the position in the file (or index in the list) that the word is found or returns -1 if the word is not found. The program output is the index or location of the word in the file, or the message "word not found". Your function should include a docstring.