Question
In python: Write a recursive function that checks if a string meets the following criteria: -checks the string for if the first and last letters
In python:
Write a recursive function that checks if a string meets the following criteria: -checks the string for if the first and last letters of string are the same. -it checks if the string is a palindrome Also, the function should prompt the user to input a phrase and check the string and output to the user whether the phrase is or not a palindrome.
Some special cases to check for: -check if the first or last character of the string is not a letter -to check to see if the rest of the string is a palindrome with that character removed -to compare letters to check that the string which you are comparing should exactly be the same as a string which is to be compared but both strings can be either in upper or lower case. A palindrome is a word, phrase, verse, or sentence that reads the same forward or backward. An example is: "taco cat."
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