Question: Exercise: How to do this on python ? Write a recursive function is_reverse that accepts two strings as a parameter and returns true if the

Exercise: How to do this on python ?

Write a recursive function is_reverse that accepts two strings as a parameter and returns true if the two strings contain the same sequence of characters as each other but in the opposite order, and false otherwise. The function is case-insensitive (ignoring capitalization).

The string could contain characters other than letters, such as numbers, spaces, or other punctuation; you should treat these like any other character. The table below shows some expected outputs for the different method calls

call

Value Returned

is_reverse("CS320", "023sC")

true

is_reverse("Madam", "MaDAm")

true

is_reverse("Q", "Q")

true

is_reverse("", "")

true

is_reverse("e via n", "N aIv E")

true

is_reverse("Go! Go", "OG !OG")

true

is_reverse("Obama", "McCain")

false

is_reverse("banana", "nanaba")

false

is_reverse("hello!!", "olleh")

false

is_reverse("", "x")

false

is_reverse("madam I", "i m adam")

false

is_reverse("ok", "oko")

false

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!