Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Evaluation Recursion: is your function recursive? Test code: did you apply separation of concerns and design for reuse? Syntax and logic errors. . Description Develop

Evaluation Recursion: is your function recursive? Test code: did you apply separation of concerns and design for reuse? Syntax and logic errors. . Description Develop a Python solution to the following problems. 1. Change the palChecker function (in the palindrome_checker.py file) as follows. a. Remove use of the Deque. b. Rewrite the palChecker function so it is recursive. Important: Your new palChecker function should NOT have any loop statement in it! 2. In your source code file, add test code to test your modifications to the palChecker function. a. . Think about the test cases you need to implement for each modification you made. b. Be sure to apply separation of concerns and design for reuse when developing your test code. from pythonds.basic import Deque def palchecker(aString): chardeque = Deque() for ch in aString: if ch.isalpha(): chardeque. addRear(ch.lower()) stillEqual = True while chardeque.size() > 1 and stillEqual: first = chardeque. removeFront() last = chardeque.removeRear() if first != last: stillEqual = False = return stillEqual print(palChecker(\"lsdkjfskf\")) print(palchecker(\"radar\")) print(palChecker(\"A man, a plan, a canal, panama.\")) , ,

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions