From 96b146249a73a036274a056b8d76f4765b0962a4 Mon Sep 17 00:00:00 2001 From: Jasper Dahil Date: Wed, 1 Nov 2017 12:11:31 +0000 Subject: [PATCH] added a variable 'response' before the return on if 'what' in sentence --- __pycache__/Get_Functions.cpython-36.pyc | Bin 2121 -> 2172 bytes what_Recog.py | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/__pycache__/Get_Functions.cpython-36.pyc b/__pycache__/Get_Functions.cpython-36.pyc index f067b4ec8121011a50dcbb229f0f260f3850b812..1de00e48f712c7061365b000a6beac5b34795fd7 100644 GIT binary patch delta 316 zcmX>p@JB$|n3tDp)%Kr}u6zs(j~S4FAdu|<#Kmb7mGx~>cvJXN_)`Q@1XF}kgwqA1 zSW-k%L{r34#8V_vBvYhPq|-T~SW{$DWLp@b*iz(DQDUg9%j-iwQ^=PF}`t z$7neDDZ7%3F-TAit_D^0Ee@O9{FKt1R69nXieiwJ9E<`?B8);zER0NyEI`P{!l48J DAFn}B delta 265 zcmew(a8f|on3tDp@0OpDe0&THj~S2v7m)1$#KjR4mG$+~xuRH7cvJXN_)`Q@1XF}k zgi}P)IigroL{r3C7^2ux#8V`IG*b#=FoUM##J=RsLW~QT6r-3jb8j(b-eOA3jbckq z%*jbjiDJsFyv352n45ZwDYJO;Rpx9)k;#rM;*5%uBUx-1`6f?e(PdQLe1v5=6Qkth z9QJS#MW8E+z=RTr#RMb_CSPZ_W7L~0#-Ze701{M&t3g$Li^C>2KczG$)s7LUqF4w> Va4-rmNieZ6GBL6MAsY*a5&!`bH_`wA diff --git a/what_Recog.py b/what_Recog.py index a5f6492..461aaec 100644 --- a/what_Recog.py +++ b/what_Recog.py @@ -9,7 +9,8 @@ def determineUserInput(sentence): sentence = sentence.lower() sentenceParce = sentence.split() if "what" in sentence: # ------------- execute the "what is" code here --------------- - return executeWhatFunction(sentence) + response =executeWhatFunction(sentence) + return response elif sentenceParce[0] in greetings: return getName(sentence) @@ -70,7 +71,7 @@ def executeWhatFunction(sentence): operatorType = "words" equationReformated = reformatSentence(sentence, operatorType) - response = round(eval(str(equationReformated)), 2) + response = round(eval(equationReformated), 2) return response else: