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
#This module was written by Khadija Raheem.
# Personal assistant questions using Dict, if-else, in operator, for loop and def functions.
def questionAnswer(User_Input):
Questions = {
"How are you feeling" : "happy",
"How old are you" : " I dont' have an age ",
"What is your favourite colour" : "red",
"What is the time" : "", # add time code
"How is the weather like" : "", # add weather code
"Whats the latest news" : "", # add latest news code
"What are the latest feeds about sports" : "", # add sports code
"Tell me a joke" : "", # add joke code
"Where do you live" : "I am virtual assistant",
"Who created you" : "I was created by group A6",
"What is your hobby" : "Sorry, i do't like talking about myself",
"When were you born" : "I don't really have a birthday, my first day as an assistant was on the 29th October 2017",
"Who is your master" : "You are my master",
"Are you my friend" : "What a question! Ofcourse im your friend",
"Do you eat and drink" : "I leave all the eating anf drinking for you",
"What features do you have" : "All i can do is help you",
"How can you help me today" : "Ofcourse, i can help you! What would you like help with",
"Whats your favourite country" : "I don't like to play favourites",
"Are you my father" : "I have you, thats enough for me",
"Who are you" : "I am your personal asisstant",
"Where's my address" : "I dont have your personal details, i don't know who you are",
"I'm feeeling bored" : "Not with me i hope",
"Are you an expert at hacking" : "I'm afraid, i can't answer that question for you",
"What languages do you speak" : "Sorry, I just speak english",
"What is your religion" : "I don't really like talking about myself",
"Where were you created" : "I was created in Lancester Library, Coventry",
"How many people were invloved in creating you" : "I was created by 6 individuals",
"What gender are you" : "I don't have a gender",
"Can you sing" : "I'd rather leave that to the professionals",
"What are your talents" : "My talent is just to assist you"
}
if User_Input in Questions:
return(Questions[User_Input])
def blackList(User_Input):
BlackListWords = ["murder", "kidnap", "bitch", "crime", "idiot", "stupid", "suicide"]
for word in BlackListWords:
if word in User_Input:
return "This kind of language is inappropriate, please do not use it again!"