Question
Weird Al Yankovics song Bob is a satiric homage to Bob Dylan. Here are the rst few lines: I, man, am regal - a German
Weird Al Yankovics song Bob is a satiric homage to Bob Dylan. Here are the rst few lines:
I, man, am regal - a German am I Never odd or even If I had a hi-fi Madam, Im Adam
Too hot to hoot No lemons, no melon Too bad I hid a boot Lisa Bonet ate no basil Warsaw was raw Was it a car or a cat I saw?
If you ignore case and punctuation, you will notice that every line of the song (and the title too) reads the same backwards and forwards. Such lines are called palindromes. Write a program that accepts a string and determines whether or not the string is a palindrome. Ignore all whitespace and punctuation, and assume that there is no distinction between upper- and lowercase letters. For example, a man, a plan, a canal, Panama, and a Toyotas a Toyota are palindromes, but Babel is not.
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