Stack machine | Computer Science homework help

 

Implement a stack machine in the language of your choice to that a string is a palindrome. this is the string XXR The SM rules for this are as follows:

You may use the StackMachine.py class in your program, but you must use the Stack Machine to determine if the input string is a palindrome or not. Also, you may use the length of the input string to determine the mid-point of the string. Output from your program must be similar to that shown in the book:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>