Problem

Palindromes. A palindrome is a word that is the same backward as forward. The word rotor i...

Palindromes. A palindrome is a word that is the same backward as forward. The word rotor is an example of a palindrome.

(a) Write a function that returns True if two strings are palindromes. (Hints: You can create a list from a string using the list() function. Lists are handy, because there is a reverse() method.)


(b) Write a program that uses your function. The program should prompt for the two strings, call the function, and then print results (something other than True or False).


(c) Some palindrome rules ignore spaces and capitalization, so “Never odd or even” is an acceptable palindrome. Improve your function to ignore spaces and capitalization.

(Hints: Lists have a remove() method, and strings have a lower() method.)


Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 8
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT