Skip to content
Permalink
Browse files
added a variable 'response' before the return on if 'what' in sentence
  • Loading branch information
dahilj committed Nov 1, 2017
1 parent 0dec9d2 commit 96b146249a73a036274a056b8d76f4765b0962a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file not shown.
@@ -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:

0 comments on commit 96b1462

Please sign in to comment.