What You Learned

Now it’s time to go back through the previous chapters and revisit the exercises there. Locate the main algorithm of the program and encapsulate it in a function. And see if it’s helpful to break one function into smaller functions. After all, nothing says you can’t call one function from another. Then see if you’re repeating some functions in your programs. Look into ways you can reuse those functions without copying the code from program to program.

When you’re ready to move on, head to the next chapter, where you’ll find some problems that will require you to make the computer repeat a process over and over.

Get Exercises for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.