Question: I have a 2-part question for my Python Programming Assignment I have due. I have to make two palindrome generating functions. Also for the second
I have a 2-part question for my Python Programming Assignment I have due. I have to make two palindrome generating functions. Also for the second function, you can reference the first function in the code to make it easier, my professor said. Thank you!
## RECURSION IS MANDATORY FOR BOTH FUNCTIONS ##

Write code in Python 3.6 1 ## Question 3.1 ## def create_palindrome_v1(start, end): Creates a palindrome of integers starting from start, ending at end (in the middle) All inputs are positive integers. No input validation required. Parameters: start, end (int), positive integers Returns: palindrome sequence (str) Restrictions. You should use recursion in this question. >>> create_palindrome_v1(1, 1) '1 >>> create_palindrome_v1(3, 5) '34543 >>> create_palindrome_v1(5, 2) 5432345' +++++++++++++++++++++++++ WRITE YOUR DOCTESTS BELOW +++++++++++++++++++++++++ # YOUR CODE STARTS HERE # 24 ## Question 3.2 ## def create_palindrome_v2 (start1, endi, start2, end2): Creates a two level palindrome of integers. The first level (outer les starts from start1 and ends at end1. The second level (inner level) si from start2 and end2. No input validation is required. Parameters: starti, endi, start2, end2 (int), positive integers Returns: palindrome sequence (str) Restrictions. You should use recursion in this question. >>> create_palindrome_v2(1, 1, 1, 1) '1_1_1 >>> create_palindrome_v2(2, 5, 5, 4) 2345_545_5432 >>> create_palindrome_v2(3, 1, 5, 9) 321_567898765_123 +++++++++++++++++++++++++ WRITE YOUR DOCTESTS BELOW ++ +++ ++++++ ++++ + ++++++++ + # YOUR CODE STARTS HERE #
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
