Extra Exercises
Have you thought of an interesting exercise? If so write it up and send it in. Please say which chapter it is for.
To get started here is one I thought of while reading a newspaper article about the readability of misspelt words.
Chapter 10
Apparently mature readers largely recognise words if the first and last letters are correct and the all the rest of the letters are there even if in an entirely wrong order. Of course all one, two and three letter words have only one spelling under those requirements. Some words such as 'from' and 'form' are anagrams that retain the same first and last letters. In these cases context nearly always allows us to read them as intended even if the wrong one is typed in.
This discovery is quite surprising and I think it would be interesting to write a program to test the claim. so:
Write a program that will read in the contents of a file containing some simple text and then display the text with the internal letters of each word scrambled.
Once you have done that you can enhance the program so that it measures how long it takes to read the text once displayed. [Hint, you can use the keyboard type and the timer we saw earlier to measure the time between the start of the display and the user pressing a key.]