inputs = input('Input:', 's');
% initial state
s = 'happy';
while ~strcmp(inputs, 'quit') && ~strcmp(inputs, 'exit')
 [s, y] = update(s, inputs);
 %display output and state       
 disp(['The Cat "',y, '", it is going to be "',s,'"']); 
        if strcmp(y, 'dies')
            break;
        end;
       inputs = input('Input:','s');
end;
