Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Bad solution) solution in Creative category for Dialogues by likewind
human_dialogue = []
robot_dialogue = []
class Chat:
def connect_human(self, human):
return human
def connect_robot(self, robot):
return robot
def show_human_dialogue(self):
global human_dialogue
return "\n".join(human_dialogue)
def show_robot_dialogue(self):
global robot_dialogue
return "\n".join(robot_dialogue)
class Person:
def send(self, text):
global human_dialogue
global robot_dialogue
human_dialogue.append(self.name + " said: " + text)
new = ''
for i in text:
if i.lower() in 'aeiou':
new += '0'
else:
new += '1'
robot_dialogue.append(self.name + " said: " + new)
class Human(Person):
def __init__(self, name):
self.name = name
class Robot(Person):
def __init__(self, name):
self.name = name
June 23, 2018