Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Acknowledgments

About this book

About the author

About the cover illustration

Chapter Introduction

Why Python?

What is a classic computer science problem?

What kinds of problems are in this book?

Who is this book for?

Python versioning, source code repository, and type hints

No graphics, no UI code, just the standard library

Part of a series

Chapter 1. Small problems

1.1. The Fibonacci sequence

1.1.1. A first recursive attempt

1.1.2. Utilizing base cases

1.1.3. Memoization to the rescue

1.1.4. Automatic memoization

1.1.5. Keep it simple, Fibonacci

1.1.6. Generating Fibonacci numbers with a generator

1.2. Trivial compression

1.3. Unbreakable encryption

1.3.1. Getting the data in order

1.3.2. Encrypting and decrypting

1.4. Calculating pi

1.5. The Towers of Hanoi

1.5.1. Modeling the towers

1.5.2. Solving The Towers of Hanoi

1.6. Real-world applications