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 info import ownInfo
from what import sentence_what
def sentence_who(sentence):
if "who" in sentence:
if "you going" in sentence:
answer = ["I am going to go see my friend", "I will go see my parents to go shopping",
"I am going to go play football with friends",
"I need to see friends for a group study"]
print(random.choice(answer))
elif "favourite" in sentence:
sentence = sentence.replace("who", "what")
sentence_what(sentence)
elif "are you" in sentence:
print("I am a ChatBot Made By The Foreigners Group")
elif "bartosz" in sentence or "Andre" in sentence or "Premo" in sentence or "Zaid" in sentence or "Alan" in sentence or "Artur" in sentence:
print("The Foreigners member")
elif "am i" in sentence:
print ("I haven't got the best memory, sorry!!")
else:
- # After the questions are answered by the user they can use Wikipedia to ask who based questions.
wikiSearch(sentence)
- # if errors occur a message is displayed asking the user to give more detail to their responses.
else:
print("I am not sure what do you mean, please clarify.")