Is the logic to solve this problem using recursion correct?

i have solved is palindrome using recursion. I wanted to know if my logic is correct that I have used to solve this.
here is my code-

Hi @pragyachoudhary1111
Your logic is totally correct. You have to just make a slight change then it will pass all your test case. When b is 0 you have to print false instead of no and true instead of yes when b is 1.