anonymous
  • anonymous
def verifyWord(userWord, madTemplate, listOfAdjs, listOfNouns, listOfVerbs): """ userWord: a string, the word the user inputted madTemplate: 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 """ if userword is in listofAdjs,listofNouns,listof or listofVerbs then True else False
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
Its Python
anonymous
  • anonymous
def verifyWord(userWord, madTemplate, listOfAdjs, listOfNouns, listOfVerbs): """ userWord: a string, the word the user inputted madTemplate: 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 """ if madTemplate == '[ADJ]': if userWord in listOfAdjs: return True return False if madTemplate == '[NOUN]': if userWord in listOfNouns: return True return False if madTemplate == '[VERB]': if userWord in listOfVerbs: return True return False
anonymous
  • anonymous
Sorry @msmithhnova the code is not working

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
I think there is an error in the code you posted @msmithhnova
anonymous
  • anonymous
It seems to work here http://ideone.com/v7ujDx and this has the same code essentially http://pastebin.com/N4XBpkE3

Looking for something else?

Not the answer you are looking for? Search for more explanations.