Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

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
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

Its Python
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
Sorry @msmithhnova the code is not working

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

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

Not the answer you are looking for?

Search for more explanations.

Ask your own question