did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781449330729

Think Python

by
  • ISBN13:

    9781449330729

  • ISBN10:

    144933072X

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2012-08-20
  • Publisher: Oreilly & Associates Inc
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99 Save up to $1.13
  • Digital
    $43.86
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

Summary

Think Python is an introduction to Python programming for students with no programming experience. It starts with the most basic concepts of programming, and is carefully designed to define all terms when they are first used and to develop each new concept in a logical progression. Larger pieces, like recursion and object-oriented programming are divided into a sequence of smaller steps and introduced over the course of several chapters.

Author Biography

Allen Downey is a Professor of Computer Science at Olin College of Engineering. He has taught computer science at Wellesley College, Colby College, and U.C. Berkeley. He has a Ph.D. in Computer Science from U.C. Berkeley and Master's and Bachelor's degrees from MIT.

Table of Contents

Prefacep. xi
The Way of the Programp. 1
The Python Programming Languagep. 1
What Is a Program?p. 3
What Is Debugging?p. 4
Syntax Errorsp. 4
Runtime Errorsp. 4
Semantic Errorsp. 5
Experimental Debuggingp. 5
Formal and Natural Languagesp. 6
The First Programp. 7
Debuggingp. 8
Glossaryp. 9
Exercisesp. 11
Variables, Expressions, and Statementsp. 13
Values and Typesp. 13
Variablesp. 14
Variable Names and Keywordsp. 15
Operators and Operandsp. 16
Expressions and Statementsp. 16
Interactive Mode and Script Modep. 17
Order of Operationsp. 18
String Operationsp. 18
Commentsp. 19
Debuggingp. 19
Glossaryp. 20
Functionsp. 23
Function Callsp. 23
Type Conversion Functionsp. 23
Math Functionsp. 24
Compositionp. 25
Adding New Functionsp. 25
Definitions and Usesp. 27
Flow of Executionp. 27
Parameters and Argumentsp. 28
Variables and Parameters Are Localp. 29
Stack Diagramsp. 30
Fruitful Functions and Void Functionsp. 31
Why Functions?p. 32
Importing with fromp. 32
Debuggingp. 33
Glossaryp. 33
Exercisesp. 35
Case Study: Interface Designp. 37
Turtle Worldp. 37
Simple Repetitionp. 38
Exercisesp. 39
Encapsulationp. 40
Generalizationp. 41
Interface Designp. 42
Refactoringp. 43
A Development Planp. 44
Docstringp. 44
Debuggingp. 45
Glossaryp. 45
Exercisesp. 46
Conditionals and Recursionp. 49
Modulus Operatorp. 49
Boolean Expressionsp. 49
Logical Operatorsp. 50
Conditional Executionp. 50
Alternative Executionp. 51
Chained Conditionalsp. 51
Nested Conditionalsp. 52
Recursionp. 53
Stack Diagrams for Recursive Functionsp. 54
Infinite Recursionp. 55
Keyboard Inputp. 55
Debuggingp. 56
Glossaryp. 57
Exercisesp. 58
Fruitful Functionsp. 61
Return Valuesp. 61
Incremental Developmentp. 62
Compositionp. 64
Boolean Functionsp. 65
More Recursionp. 66
Leap of Faithp. 68
One More Examplep. 68
Checking Typesp. 69
Debuggingp. 70
Glossaryp. 71
Exercisesp. 72
Iterationp. 75
Multiple Assignmentp. 75
Updating Variablesp. 76
The while Statementp. 76
breakp. 78
Square Rootsp. 79
Algorithmsp. 80
Debuggingp. 81
Glossaryp. 81
Exercisesp. 82
Stringsp. 85
A String Is a Sequencep. 85
lenp. 86
Traversal with a for Loopp. 86
String Slicesp. 87
Strings Are Immutablep. 88
Searchingp. 89
Looping and Countingp. 89
String Methodsp. 90
The in Operatorp. 91
String Comparisonp. 92
Debuggingp. 92
Glossaryp. 94
exercisesp. 95
Case Study: Word Playp. 97
Reading Word Listsp. 97
Exercisesp. 98
Searchp. 99
Looping with Indicesp. 100
Debuggingp. 102
Glossaryp. 102
Exercisesp. 103
Listsp. 105
A List Is a Sequencep. 105
Lists Are Mutablep. 106
Traversing a Listp. 107
List Operationsp. 107
List Slicesp. 108
List Methodsp. 108
Map, Filter, and Reducep. 109
Deleting Elementsp. 111
Lists and Stringsp. 112
Objects and Valuesp. 112
Aliasingp. 113
List Argumentsp. 114
Debuggingp. 116
Glossaryp. 117
Exercisesp. 118
Dictionariesp. 121
Dictionary as a Set of Countersp. 123
Looping and Dictionariesp. 124
Reverse Lookupp. 125
Dictionaries and Listsp. 126
Memosp. 128
Global Variablesp. 129
Long Integersp. 130
Debuggingp. 131
Glossaryp. 132
Tuplesp. 135
Tuples Are Immutablep. 135
Tuple Assignmentp. 136
Tuples as Return Valuesp. 137
Variable-Length Argument Tuplesp. 137
Lists and Tuplesp. 138
Dictionaries and Tuplesp. 139
Comparing Tuplesp. 141
Sequences of Sequencesp. 142
Debuggingp. 143
Glossaryp. 144
Exercisesp. 144
Case Study: Data Structure Selectionp. 147
Word Frequency Analysisp. 147
Random Numbersp. 148
Word Histogramp. 149
Most Common Wordsp. 150
Optional Parametersp. 151
Dictionary Subtractionp. 151
Random Wordsp. 152
Markov Analysisp. 153
Data Structuresp. 154
Debuggingp. 156
Glossaryp. 157
Exercisesp. 158
Filesp. 159
Persistencep. 159
Reading and Writingp. 159
Format Operatorp. 160
Filenames and Pathsp. 161
Catching Exceptionsp. 162
Databasesp. 163
Picklingp. 164
Pipesp. 165
Writing Modulesp. 166
Debuggingp. 167
Glossaryp. 168
Classes and Objectsp. 171
User-Defined Typesp. 171
Attributesp. 172
Rectanglesp. 173
Instances as Return Valuesp. 174
Objects Are Mutablep. 175
Copyingp. 176
Debuggingp. 177
Glossaryp. 178
Exercisesp. 178
Classes and Functionsp. 181
Timep. 181
Pure Functionsp. 182
Modifiersp. 183
Prototyping Versus Planningp. 184
Debuggingp. 185
Glossaryp. 186
Exercisesp. 187
Classes and Methodsp. 189
Object-Oriented Featuresp. 189
Printing Objectsp. 190
Another Examplep. 191
A More Complicated Examplep. 192
The init Methodp. 192
The_str_Methodp. 193
Operator Overloadingp. 194
Type-Based Dispatchp. 194
Polymorphismp. 196
Debuggingp. 197
Interface and Implementationp. 197
Glossaryp. 198
Exercisesp. 199
Inheritancep. 201
Card Objectsp. 201
Class Attributesp. 202
Comparing Cardsp. 204
Decksp. 205
Printing the Deckp. 205
Add, Remove, Shuffle, and Sortp. 206
Inheritancep. 207
Class Diagramsp. 209
Debuggingp. 210
Data Encapsulationp. 211
Glossaryp. 212
Exercisesp. 213
Case Study: Tkinterp. 217
GUIp. 217
Buttons and Callbacksp. 218
Canvas Widgetsp. 219
Coordinate Sequencesp. 220
More Widgetsp. 221
Packing Widgetsp. 222
Menus and Callablesp. 224
Bindingp. 225
Debuggingp. 227
Glossaryp. 229
Exercisesp. 230
Debuggingp. 233
Analysis of Algorithmsp. 243
Lumpyp. 255
Indexp. 265
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program