(text values in a text file)
Text Files
One or more lines of text, each separated by a newline (\n) : The key file operations are required:
Examine the text file, it contains the names of all 32 Scottish Councils. Each council name is displayed on a new line. Compare the code with the description in codeClips. Make sure you know what code is used to open, read and close the file. requirement challenges
What is the longest council name? What is the shortest council name? How many councils end in the letters "shire"? How many councils names start with a compass direction? reuse code for standard algorithms to solve the challenges. project code
avoid looking at the sample code before attempting the project first
sample finished code
The key file operations are demonstrated:
The text file contains the names of all 32 Scottish Councils. Each council is displayed on a new line. You will know what code is used to open, read and close the file.