15. File Assignments
Short problems using File.
-
Count the number of lines in a file.
-
Count the number of words in a file.
-
Count the number of characters in a file.
-
Find the sum of all of the integers in a file.
-
Print out the file with line numbers in front of each line.
-
Where’s Waldo? Create a file called “waldo.txt” that consists of 10000 lines of text. Each line should have 10 random integers from 0 to 9999. Except that there is a 0.1% chance that a given line will instead have all of the same integer.
-
Find Waldo Read a file called “waldo.txt” and print out every integer that occurs 10 times on a line, just like you would make in the previous problem.
-
Implement the “tree” command.
. └── Risk ├── build.bat ├── build.sh ├── changelog.txt ├── compress.rkt ├── contributors.txt ├── notes.txt ├── PlannedAdditions.txt ├── README.md └── src ├── dice-functs.rkt ├── ellipse.rkt ├── fonts │ └── Roboto-Light.ttf ├── graph.rkt ├── hit-box-determiner.rkt ├── imgs │ ├── 6ca.jpg │ ├── board.png │ ├── cardico.png │ ├── close.png etc you get the idea