Permalink
Cannot retrieve contributors at this time
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?
ChatBotGroup/Jokes.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
18 lines (17 sloc)
1.17 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random # This is required to include random module | |
jokekeywords = ["Yes", "yes", "Sure", "sure", "Why not", "why not", "Okey", "okey", "Ok", "ok", "Yeah", "yeah"] | |
jokekeywords1 = ["No", "no", "No, thanks", "no thanks", "Nah", "nah"] | |
joke_responces = ["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? -Snowballs.", | |
"I can’t believe I forgot to go to the gym today. That’s 7 years in a row now.", | |
"A naked women robbed a bank. Nobody could remember her face.", | |
"I’m selling my talking parrot. Why? Because yesterday, the bastard tried to sell me.", | |
"A wife is like a hand grenade. Take off the ring and say good bye to your house.", | |
" Don’t be sad when a bird craps on your head. Be happy that dogs can’t fly."] | |
joke = input("Do you wanna hear a joke? ") | |
if joke in jokekeywords: | |
print("Okey, here you go" + "!" + "-" + random.choice(joke_responces)) | |
elif joke in jokekeywords1: | |
print("Meh, that is not interesting") | |
else: | |
print("What do you mean?") |