Skip to content
Permalink
Browse files

fixed the one word greeting ex 'hi'

  • Loading branch information
dahilj committed Nov 22, 2017
1 parent 8c43628 commit 7ddfb7a8d1c04cdc76d253de5b9f1fe0f335f8d2
Showing with 4 additions and 2 deletions.
  1. +4 −2 determineUserInput.py
@@ -20,8 +20,10 @@ def determineUserInput(sentence):
if (sentenceParse[0] == "i" and len(sentenceParse) > 1):
if (sentenceParse[1] in ["m","am"]):
sentenceParse.insert(0, " ".join(sentenceParse[0:2]))

if sentenceParse[0] in questionStarters: # ------------- execute the "what is" code here ---------------

if len(sentenceParse) == 1 and sentenceParse[0] in greetings:
response = random.choice(greetings[0:10]), 2
elif sentenceParse[0] in questionStarters: # ------------- execute the "what is" code here ---------------
response = respondQuestion(sentence), 2
elif sentenceParse[0] in greetings:
response = getName(sentence), 1

0 comments on commit 7ddfb7a

Please sign in to comment.
You can’t perform that action at this time.