fixed question1 with Python and rewrote question 2 to search contents of the file.