Question: Part I ( Warmup Problems ) Problem 4 ( Palindrome ) Implement the function _ isPalindrome ( ) in palindrome.py , using recursion, such that
Part I Warmup Problems Problem Palindrome
Implement the function isPalindrome in palindrome.py using recursion, such that it returns True if the argument s is a palindrome ie reads the same forwards and backwards and False otherwise
~workspaceatomic nature of matter
$ python palindrome.py bolton False
$ python palindrome.py madam True
Part I Warmup Problems Problem Palindrome
Set n to the length of s
Base case: if n return True
Recursive step: return True if the first character in s is the same as the last character and isPalindromes : n is True; otherwise, return False
python code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
