#!/usr/bin/env python
#
# Psychiatrist program "Geoffrey" - first draft

patient = raw_input ("What is your name? ")
print "Hello, " + patient + ". It's very nice to meet you."
print "Just so you know, you can stop or change the subject at any time. Just \
say 'stop' to stop or 'change' to change the subject."
answer = ""
while answer != "stop" and answer != "change":
    problem = raw_input ("So what is it that brings you here? ")
    if problem == "stop":
        answer = "stop"
    if problem == "change":
        answer = "change"
    else:
        severity = raw_input ("Is this problem really bothering you? ")
        if severity == "yes":
            reason = raw_input ("Why does this problem bother you so much? Tell me more about it. ")
        if severity == "no":
            print "So it's not a big problem. That's OK, we can still talk about it if you want to."
            persist = raw_input ("Do you still want to talk about it? ")
            if persist == "yes":
                print "ok, what else do you think I should know about this problem? "
            if persist == "no":
                nextstep = raw_input ("ok, do you want to change the subject or do you want to stop? ")
                if nextstep == "change":
                    answer = "change"
                if nextstep == "stop":
                    answer = "stop"
        if severity == "stop":
            answer = "stop"
        if severity == "change":
            answer = "change"
        else:
            print "I did not recognize your response. Please say 'yes' or 'no'."
if answer == "change":
    print "OK, let's talk about something else, then."
    answer = ""
    problem = raw_input ("What would you like to talk about?")
if answer == "stop":
    quit
