def chat(): npc = NPC() sentence = input('Say something to ' + npc.name + ': ') while sentence != 'quit': eliza_speech = npc.process_input(sentence) if eliza_speech: print(npc.name.upper() + ': ', end='') print_speech(eliza_speech) sentence = input('YOU: ')