Skip to content
Permalink
master
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
import random
from wiki import wikiSearch
from chatmaths import entre
from info import informations, ownInfo
""" prepered answers to what questions """
def sentence_what(sentence):
""" Function to get ChatBot information related to WHAT questions """
if "your" in sentence:
if "last name" in sentence:
answer = ["My last name is Foreigners", "My last name is B", "My last name is C", "My last name is D"]
print(random.choice(answer))
elif "middle name" in sentence:
print("My middle names are Made By The")
elif "full name" in sentence:
print("My name is ChatBot Made By The Foreigners")
elif "name" in sentence:
print("My name is ChatBot")
else:
informations(sentence) #calls other answers about the chatbot
elif "my" in sentence:
ownInfo(sentence) #calls other questions and answers about the user
else:
wikiSearch(sentence) #if there are no "personal" questions, calls wikiSearch to search in wikipedia for meanings