9.11. Exercises
9-1. File Filtering. Display all lines of a file, except those that start with a pound sign ( # ), the comment character for Python, Perl, Tcl, and most other scripting languages.
9-2. File Access. Prompt for a number N and file F, and display the first N lines of F.
9-3. File Information. Prompt for a filename and display the number of lines in that text file.
9-4. File Access. Write a “pager” program. Your solution should prompt for a file name, and display the text file 25 lines at a time, pausinLg each time to ask the user to “press a key to continue.”
9-5. Test Scores. Update your solution to the test scores problems (Exercises 5–3 and 6–4) by allowing a set of test scores be loaded from a file. We leave the file format to your ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access