Skip to Main Content
Python Programming: A modular approach
book

Python Programming: A modular approach

by Kumar Naveen, Taneja Sheetal
January 2017
Intermediate to advanced content levelIntermediate to advanced
606 pages
14h 1m
English
Pearson Education India
Content preview from Python Programming: A modular approach

CHAPTER 8

RECURTION

CHAPTER OUTLINE

8.1 Recursive Solutions for Problems on Numeric Data

8.2 Recursive Solutions for Problems on Strings

8.3 Recursive Solutions for Problems on Lists

8.4 Problem of Tower of Hanoi

In the previous chapters, we have used functions for various programming tasks. When computation in a function is described in terms of the function itself, it is called a recursive function. Python allows a function to call itself, possibly with new arguments.

Recursion aims to solve a problem by providing a solution in terms of the simpler version of the same problem. A recursive function definition comprises two parts. The first part is the base part, which is the solution of the simplest version of the problem, often termed stopping ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modular Programming with Python

Modular Programming with Python

Erik Westra
Python Programming Blueprints

Python Programming Blueprints

Daniel Furtado, Marcus Pennington

Publisher Resources

ISBN: 9789352866038