Typo filehandle name in 3. File Handling
At line: line = f.readlines() #reads the entire file and returns entry list
f should be substituted with file_handle to work properly: line = file_handle.readlines() #reads the entire file and returns entry list