| 1 | def spellcheck(str): |
| 2 | """Take the string str and print out each misspelled word, or 'passed' |
| 3 | if all words are spelled correctly.""" |
| 4 | pass |
| 5 | |
| 6 | def checkwrd(wrd): |
| 7 | """Take a word and return 1 if it is spelled correctly, otherwise |
| 8 | return 0. This function is called by spellcheck on each word.""" |
| 9 | pass |
| 10 | |
| 11 | def findword(wrd): |
| 12 | """Open up the dictionary file and return 1 if the word was found |
| 13 | in the dictionary, 0 if not. Called on by checkwrd.""" |
| 14 | pass |
| 15 | |
| 16 | def isword(wrd): |
| 17 | """Return 1 if wrd is a valid word (a string of characters made up of |
| 18 | only letters), 0 if not. Called by checkwrd.""" |
| 19 | pass |
| 20 | |
| 21 | def removeword(wrd): |
| 22 | """Call on isword and findword to find out if wrd is a dictionary |
| 23 | entry, and remove it if it is. Otherwise print out an error message. |
| 24 | This modifies the dictionary file.""" |
| 25 | pass |
| 26 | |
| 27 | def addword(wrd): |
| 28 | """Call on isword to see if wrd is a valid word, then call findword to |
| 29 | see if it is in the dictionary. If not, add it to the dictionary, if |
| 30 | it is already there print out '<wrd> is already in the dictionary.' |
| 31 | This modifies the dictionary file.""" |
| 32 | pass |