From ea7bc3456277be61f97971d49619b1195ba72ff3 Mon Sep 17 00:00:00 2001 From: Jasper Dahil Date: Wed, 1 Nov 2017 12:30:47 +0000 Subject: [PATCH] added a 'number' option to see if the user is answering the correct question --- what_Recog.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/what_Recog.py b/what_Recog.py index 461aaec..7ef7253 100644 --- a/what_Recog.py +++ b/what_Recog.py @@ -8,14 +8,15 @@ def determineUserInput(sentence): response = "" sentence = sentence.lower() sentenceParce = sentence.split() + if "what" in sentence: # ------------- execute the "what is" code here --------------- - response =executeWhatFunction(sentence) - return response + response = executeWhatFunction(sentence) + return response, 2 elif sentenceParce[0] in greetings: - return getName(sentence) + return getName(sentence), 1 else: - return sentence + return sentence, 0 def reformatSentence(sentence, operatorType): """reformats the sentence so we're left with just the equation"""