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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!