Coursework 2

(b) Check if a string is an English word

Write a function is_english_word(string), which will test if its input string is an English word, according to the file english_words.txt. This file contains a large number of English words, including all common words and many very rare words. Proper names are not included, and all words are given in lower case, with one word on each line of the file.

You need to download the file of English words. Note that it is not a program file and you do not need to edit it. Your function is_english_word(string) should be written in the file cw2.py, along with all the other functions for this coursework. But that function will read in the information from english_words.txt.

Your function is_english_word(string) should take any string as its argument and return a Boolean value --- i.e. True or False. More specifically your function should return True if any of the following conditions hold: If none of these conditions hold, your function should return False.

Examples
INPUT OUPUT
"python" True
"Python" True
"PYTHON" True
"pyThon" False
"splap" False