1. Write English comments for each line to understand what that line does.
Done for stuff I don’t understand.
2. Each time print_a_line is run, you are passing in a variable current_file. Write out what current_file is equal to on each function call, and trace how it becomes line_count in print_a_line.
3. Find each place a function is used, and check its def to make sure that you are giving it the right arguments.
4. Research online what the seek function for file does. Try ri File and see if you can figure it out from there. Then try ri “File#seek” to see what seek does.
I typed it in, and this is what comes out, I have absolutely no clue what that means, however did find the readline command.
5. Research the shorthand notation += and rewrite the script to use += instead.
+=, for example R + 1 is the same as R+=1
We can rewrite it with other operators as well. -=, *= and so on.