Skip to content
Permalink
196c1205be
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
16 lines (14 sloc) 1.07 KB
#made by Ridvan Karaman
joke_keywords = ("Tell me a joke.", "Can you tell me a joke?", "Tell me a joke,please.",
"I need a joke.", "Do you know any jokes?", " A joke would be nice")
joke_responces = ["Can a kangaroo jump higher than a house? \n Of course, a house doesn’t jump at all.",
" Anton, do you think I’m a bad mother? \n My name is Paul.",
"My dog used to chase people on a bike a lot. It got so bad, finally I had to take his bike away.",
"What is the difference between a snowman and a snowwoman? \n Snowballs.",
"My wife suffers from a drinking problem. \n Oh is she an alcoholic? \n No, I am, but she’s the one who suffers.",
"The inventor of AutoCorrect is a stupid mass hole. He can fake right off.",
"A naked women robbed a bank. Nobody could remember her face."]
def joke_check(sentence):
for word in sentence.words:
if word in joke_keywords:
return random.choice(joke_responces)