spacepaste

  1.  
  2. print "Hello, my name is Eliza. What would you like to talk about?"
  3. a = raw_input()
  4. b = a.lower()
  5. c = b.replace(" ","")
  6. d = str()
  7. while b != "go away":
  8. b = a.lower()
  9. c = b.replace(" ","")
  10. d = str()
  11. if "feel" in b:
  12. print "Do you often feel that way?"
  13. a = raw_input()
  14. elif " you"in b:
  15. if "you" and "me" in b:
  16. print "What makes you think I "+str(a[b.find("you")+4:b.find("me")-1])+" you?"
  17. a = raw_input()
  18. else:
  19. a = raw_input()
  20. elif "iam" in c:
  21. if "i am" in b or a[0] == "i am":
  22. for i in a[b.find("i am")+5:]:
  23. d = d+i
  24. if i == " ":
  25. break
  26. print "How long have you been "+str(d).replace(" ","")+"?"
  27. a = raw_input()
  28. elif "feel" and "iam" and "you" not in c:
  29. if b !="go away":
  30. print "Please go on"
  31. a = raw_input()
  32. if b =="go away":
  33. print "I hope I have helped you!"
  34.