Log In
Or create an account -> 
Imperial Library
  • Home
  • About
  • News
  • Upload
  • Forum
  • Help
  • Login/SignUp

Index
Preface
The Strange History of This Book Conventions Used in This Book Using Code Examples Safari® Books Online How to Contact Us Acknowledgments Contributor List
1. The Way of the Program
What Is a Program? Running Python The First Program Arithmetic Operators Values and Types Formal and Natural Languages Debugging Glossary Exercises
2. Variables, Expressions and Statements
Assignment Statements Variable Names Expressions and Statements Script Mode Order of Operations String Operations Comments Debugging Glossary Exercises
3. Functions
Function Calls Math Functions Composition Adding New Functions Definitions and Uses Flow of Execution Parameters and Arguments Variables and Parameters Are Local Stack Diagrams Fruitful Functions and Void Functions Why Functions? Debugging Glossary Exercises
4. Case Study: Interface Design
The turtle Module Simple Repetition Exercises Encapsulation Generalization Interface Design Refactoring A Development Plan docstring Debugging Glossary Exercises
5. Conditionals and Recursion
Floor Division and Modulus Boolean Expressions Logical Operators Conditional Execution Alternative Execution Chained Conditionals Nested Conditionals Recursion Stack Diagrams for Recursive Functions Infinite Recursion Keyboard Input Debugging Glossary Exercises
6. Fruitful Functions
Return Values Incremental Development Composition Boolean Functions More Recursion Leap of Faith One More Example Checking Types Debugging Glossary Exercises
7. Iteration
Reassignment Updating Variables The while Statement break Square Roots Algorithms Debugging Glossary Exercises
8. Strings
A String Is a Sequence len Traversal with a for Loop String Slices Strings Are Immutable Searching Looping and Counting String Methods The in Operator String Comparison Debugging Glossary Exercises
9. Case Study: Word Play
Reading Word Lists Exercises Search Looping with Indices Debugging Glossary Exercises
10. Lists
A List Is a Sequence Lists Are Mutable Traversing a List List Operations List Slices List Methods Map, Filter and Reduce Deleting Elements Lists and Strings Objects and Values Aliasing List Arguments Debugging Glossary Exercises
11. Dictionaries
A Dictionary Is a Mapping Dictionary as a Collection of Counters Looping and Dictionaries Reverse Lookup Dictionaries and Lists Memos Global Variables Debugging Glossary Exercises
12. Tuples
Tuples Are Immutable Tuple Assignment Tuples as Return Values Variable-Length Argument Tuples Lists and Tuples Dictionaries and Tuples Sequences of Sequences Debugging Glossary Exercises
13. Case Study: Data Structure Selection
Word Frequency Analysis Random Numbers Word Histogram Most Common Words Optional Parameters Dictionary Subtraction Random Words Markov Analysis Data Structures Debugging Glossary Exercises
14. Files
Persistence Reading and Writing Format Operator Filenames and Paths Catching Exceptions Databases Pickling Pipes Writing Modules Debugging Glossary Exercises
15. Classes and Objects
Programmer-Defined Types Attributes Rectangles Instances as Return Values Objects Are Mutable Copying Debugging Glossary Exercises
16. Classes and Functions
Time Pure Functions Modifiers Prototyping versus Planning Debugging Glossary Exercises
17. Classes and Methods
Object-Oriented Features Printing Objects Another Example A More Complicated Example The init Method The __str__ Method Operator Overloading Type-Based Dispatch Polymorphism Interface and Implementation Debugging Glossary Exercises
18. Inheritance
Card Objects Class Attributes Comparing Cards Decks Printing the Deck Add, Remove, Shuffle and Sort Inheritance Class Diagrams Data Encapsulation Debugging Glossary Exercises
19. The Goodies
Conditional Expressions List Comprehensions Generator Expressions any and all Sets Counters defaultdict Named Tuples Gathering Keyword Args Glossary Exercises
20. Debugging
Syntax Errors
I keep making changes and it makes no difference.
Runtime Errors
My program does absolutely nothing. My program hangs.
Infinite loop Infinite recursion Flow of execution
When I run the program I get an exception. I added so many print statements I get inundated with output.
Semantic Errors
My program doesn’t work. I’ve got a big hairy expression and it doesn’t do what I expect. I’ve got a function that doesn’t return what I expect. I’m really, really stuck and I need help. No, I really need help.
21. Analysis of Algorithms
Order of Growth Analysis of Basic Python Operations Analysis of Search Algorithms Hashtables Glossary
Index
  • ← Prev
  • Back
  • Next →
  • ← Prev
  • Back
  • Next →

Chief Librarian: Las Zenow <zenow@riseup.net>
Fork the source code from gitlab
.

This is a mirror of the Tor onion service:
http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion