Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud
by Paul J. Deitel, Harvey M. Deitel
11.16 Wrap-Up
In this chapter, which concludes our introduction to Python programming, you immersed yourself in some computer science thinking that goes beyond programming fundamentals. You created recursive functions—i.e., functions that call themselves. These functions (or methods) typically divide a problem into two conceptual pieces—the base case and the recursion step. The latter is a slightly smaller version of the original problem and is performed by a recursive function call. You saw some popular recursion examples, including calculating factorials and Fibonacci numbers. We compared recursive and iterative problem-solving approaches.
We also introduced searching and sorting. We discussed two searching algorithms—linear search and binary ...
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.
Read now
Unlock full access