Professional Documents
Culture Documents
DGD
DGD
string, the type of word the user was supposed to input listOfAdjs: a list of valid adjectives listOfNouns: a list of valid nouns listOfVerbs: a list of valid verbs): returns: Boolean, whether or not the word is valid """ # Your Code Here
for s in listOfAdjs: if ((userWord==s) and (madTemplate=='[ADJ]')): return True for s in listOfNouns: if ((userWord==s) and (madTemplate=='[NOUN]')): return True for s in listOfVerbs: if ((userWord==s) and (madTemplate=='[VERB]')): return True return False