Lecture Notes on 31 Oct 2014 Algorithm to check the validity of ISBNs. * Open the file isbn.txt for reading * Open the file isbnOut.txt for writing * Read the file isbn.txt line by line * Strip the line * Replace all hyphens with nothing * Check if the length of isbn string is 10 * Check if the first 9 characters are all digits * Check the tenth character and see if it is a digit or 'x' or 'X' * Create an empty isbn list * Go through the isbn string character by character, convert character to an int and append to the isbn list * Create a list s1 containing the partial sum of the isbn list * Create a list s2 containing the partial sum of the s1 list * Examine the last number in the list s2. If it is divisible by 11 then the isbn is valid. * Write out the result * Close the file isbn.txt * Close the file isbnOut.txt