Question: Using recursion to print a list in reverse order Write a method called printReverse() that takes a list and uses recursion to print the contents

Using recursion to print a list in reverse order Write a method called printReverse() that takes a list and uses recursion to print the contents of the list in reverse order. The list itself should not be reversed; it must be left in its original form. Your method should have the following header: def printReverse(alist, i) where alist is a reference to the list, and i is an integer parameter that you may use as you see fit. You do not need to code up this method as part of a class a written version of the method itself is all that is required. For full credit, your printReverse() method should consider the first element of the list first i.e., the first call to printReverse() should be the one that prints the first element, the second call should be the one that prints the second element, and so on. Half credit will be given for methods that consider the last element first. In either case, your method must be recursive; no credit will be given for methods that employ iteration

USING PYTHON 3

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!