Create a class called palindrome in your palindrome class


Please see question on Classes in Python. This question tests your ability to manipulate strings. A palindromic word is one that reads the same backwards as forwards.

Hence the words hello and peel are not palindromes, but the words peep, deed and dad are palindromes.

(a) Create a class called Palindrome.

(b) In your Palindrome class, create a method called reverse() which takes a string argument. Your method should return the reverse of the argument as a string. For example, if the argument is ‘‘Foobar'' then your method should return ‘‘rabooF''.

(c) Create a second method in Palindrome called isPalindrome() which takes a string argument. This method should return True if the argument is a palindrome and False otherwise.

(d) Write some code to test your new Palindrome class and print out results of your testing to the user. Give some consideration to what sort of strings you might want to use for your testing.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Create a class called palindrome in your palindrome class
Reference No:- TGS02893471

Expected delivery within 24 Hours