Question: Write a PYTHON program that asks the user to input a word and checks to see if it is a palindrome or not, you must
Write a PYTHON program that asks the user to input a word and checks to see if it is a palindrome or not, you must use the Stack data structure(which is similiar to the one provided below)
A palindrome is a word that can be read the same forwards as backwards. Examples: rotor, level, kayak, racecare, noon, madam, etc.
class Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def push(self, item): self.items.append(item) def pop(self): return self.items.pop() def peek(self): return self.items[len(self.items)-1] def size(self): return len(self.items)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
