Question: Goal: Learn to write recursive functions. Assignment: Let's define a palingram list of tuples as a list of tuples, which, when both the list and
Goal: Learn to write recursive functions.
Assignment: Let's define a palingram list of tuples as a list of tuples, which, when both the list and the tuples in it are
reversed, remains the same. Write a recursive function ispalingram that accepts a list of tuples and returns whether it is
a palingram.
A list of tuples is a palingram if:
The list is empty;
The list has only one element, and that element is the same as its reverse ie is a palindrome;
The first element and the reverse of the last element are the same, and the rest of the list is a palingram.
Note: You are allowed to create multiple functions, however, you cannot use any loop.
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
