Question: Please add code to the provided code. Our program tests whether an input string is a palindrome. Our program output must be identical to
Please add code to the provided code. Our program tests whether an input string is a palindrome. Our program output must be identical to this sample output. A palindrome is a string of characters (a word, phrase, or sentence) that is the same regardless of whether we read it forward or backward. For example, Race car is a palindrome. So is A man, a plan, a canal: Panama. More about palindromes: http://www.palindromelist.net/. We ignore spaces [>>] Enter a string (or a! to exit) : Csc [+] Yes. "Csc" IS a palindrome! [>>] Enter a string: CSC 220 Data Structures [-] No. "CSC 220 Data Structure" is NOT a palindrome! [>>] Enter a string: Ah, Satan sees Natasha! Interactive [+] Yes. "Ah, Satan sees Natasha!" IS a palindrome! [>>] Enter a string: Amy, must I jujitsu my ma? [+] Yes. "Amy, must I jujitsu my ma?" IS a palindrome! [>>] Enter a string: A man, a plan, a canal: Panama. [+] Yes. "A man, a plan, a canal: Panama." IS a palindrome! [>>] Enter a string: Are Mac 'n' Oliver evil on camera? [+] Yes. "Are Mac 'n' Oliver evil on camera?" IS a palindrome! [>>] Enter a string: ! [
Step by Step Solution
There are 3 Steps involved in it
Here is a Python code snippet that checks if a string is a palindro... View full answer
Get step-by-step solutions from verified subject matter experts
