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 16

MORE ON RECURSION

CHAPTER OUTLINE

16.1 Pattern Within a Pattern

16.2 Generalized Eight Queens Problem

16.3 Knight's Tour Problem

16.4 Stable Marriage Problem

16.5 Fractal (Hilbert Curve and Sierpinski Triangle)

16.6 Suduko

16.7 Guidelines on Using Recursion

In Chapter 8, we discussed recursion and its applications in detail. In this chapter, we focus on more advanced problems that can be solved using recursion.

16.1 PATTERN WITHIN A PATTERN

In this section, we will use recursion to print a picture comprising several squares within each other. For this purpose, we need to import a graphical package, and matplotlib is one such choice (discussed in detail in the next chapter). It contains methods for 2D graphics that would be required ...

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