Question
Example 1 Example 2 Example 3 Example 4 A xxssxxa Yes hello No Amore, Roma Yes Yo, banana boy! No Programming language:Python A palindrome is
Example 1 | Example 2 | Example 3 | Example 4 |
A xxssxxa Yes | hello No
| Amore, Roma Yes | Yo, banana boy! No |
Programming language:Python
A palindrome is a word that reads the same backwards as forwards such as radar, level, and kayak. An example of a palindrome sentence is "Was it a car or a cat I saw?". The concept of palindrome has a rich history but the first physical examples can be dated to the 1st century CE, the Sator square found on a wall in the medieval town of Oppde-le-Vieux, France. In this part of the assignment, you will write a program called PannaP to detect palindrome strings.
PaNNaP works as follows:
Takes a string called source as the first input.
PaNNaP checks if the user-provided string, source, is a palindrome.
PaNNaP is case-insensitive, meaning that it does not discriminate between uppercase and lowercase
letters.
PaNNaP should ignore spaces and commas in the user-provided string.
Finally, PaNNaP prints 'Yes' if the input is a palindrome and 'No' otherwise.
You are not allowed to use any Python built-in methods or user-defined modules in developing PaNNaP. Table above shows sample input and output of PaNNaP. Note
that your program input and output format should be exactly the same as the format of the examples shown in the table above.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started