More New and Used
from Private Sellers
Think Python
by Downey, AllenISBN13:
9781449330729
ISBN10:
144933072X
Format:
Paperback
Pub. Date:
8/27/2012
Publisher(s):
Oreilly & Associates Inc
List Price: $42.65
Rent Textbook
(Recommended)Term
Due
Price
Short Term
Aug 2
$29.86
Semester
Oct 2
$34.12
Quarter
Aug 23
$31.99
$29.86
Buy New Textbook
In Stock Usually Ships in 24-48 Hours
$41.58
eTextbook
180 day subscription
$38.39
Used Textbook
We're Sorry
Sold Out
Questions About This Book?
Why should I rent this book?
Renting is easy, fast, and cheap! Renting from eCampus.com can save you hundreds of dollars compared to the cost of new or used books each semester. At the end of the semester, simply ship the book back to us with a free UPS shipping label! No need to worry about selling it back.
How do rental returns work?
Returning books is as easy as possible. As your rental due date approaches, we will email you several courtesy reminders. When you are ready to return, you can print a free UPS shipping label from our website at any time. Then, just return the book to your UPS driver or any staffed UPS location. You can even use the same box we shipped it in!
What version or edition is this?
This is the edition with a publication date of 8/27/2012.
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 CDs, lab manuals, study guides, etc.
- The Rental copy of this book is not guaranteed to include any supplemental materials. You may receive a brand new copy, but typically, only the book itself.
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
| Preface | p. xi |
| The Way of the Program | p. 1 |
| The Python Programming Language | p. 1 |
| What Is a Program? | p. 3 |
| What Is Debugging? | p. 4 |
| Syntax Errors | p. 4 |
| Runtime Errors | p. 4 |
| Semantic Errors | p. 5 |
| Experimental Debugging | p. 5 |
| Formal and Natural Languages | p. 6 |
| The First Program | p. 7 |
| Debugging | p. 8 |
| Glossary | p. 9 |
| Exercises | p. 11 |
| Variables, Expressions, and Statements | p. 13 |
| Values and Types | p. 13 |
| Variables | p. 14 |
| Variable Names and Keywords | p. 15 |
| Operators and Operands | p. 16 |
| Expressions and Statements | p. 16 |
| Interactive Mode and Script Mode | p. 17 |
| Order of Operations | p. 18 |
| String Operations | p. 18 |
| Comments | p. 19 |
| Debugging | p. 19 |
| Glossary | p. 20 |
| Functions | p. 23 |
| Function Calls | p. 23 |
| Type Conversion Functions | p. 23 |
| Math Functions | p. 24 |
| Composition | p. 25 |
| Adding New Functions | p. 25 |
| Definitions and Uses | p. 27 |
| Flow of Execution | p. 27 |
| Parameters and Arguments | p. 28 |
| Variables and Parameters Are Local | p. 29 |
| Stack Diagrams | p. 30 |
| Fruitful Functions and Void Functions | p. 31 |
| Why Functions? | p. 32 |
| Importing with from | p. 32 |
| Debugging | p. 33 |
| Glossary | p. 33 |
| Exercises | p. 35 |
| Case Study: Interface Design | p. 37 |
| Turtle World | p. 37 |
| Simple Repetition | p. 38 |
| Exercises | p. 39 |
| Encapsulation | p. 40 |
| Generalization | p. 41 |
| Interface Design | p. 42 |
| Refactoring | p. 43 |
| A Development Plan | p. 44 |
| Docstring | p. 44 |
| Debugging | p. 45 |
| Glossary | p. 45 |
| Exercises | p. 46 |
| Conditionals and Recursion | p. 49 |
| Modulus Operator | p. 49 |
| Boolean Expressions | p. 49 |
| Logical Operators | p. 50 |
| Conditional Execution | p. 50 |
| Alternative Execution | p. 51 |
| Chained Conditionals | p. 51 |
| Nested Conditionals | p. 52 |
| Recursion | p. 53 |
| Stack Diagrams for Recursive Functions | p. 54 |
| Infinite Recursion | p. 55 |
| Keyboard Input | p. 55 |
| Debugging | p. 56 |
| Glossary | p. 57 |
| Exercises | p. 58 |
| Fruitful Functions | p. 61 |
| Return Values | p. 61 |
| Incremental Development | p. 62 |
| Composition | p. 64 |
| Boolean Functions | p. 65 |
| More Recursion | p. 66 |
| Leap of Faith | p. 68 |
| One More Example | p. 68 |
| Checking Types | p. 69 |
| Debugging | p. 70 |
| Glossary | p. 71 |
| Exercises | p. 72 |
| Iteration | p. 75 |
| Multiple Assignment | p. 75 |
| Updating Variables | p. 76 |
| The while Statement | p. 76 |
| break | p. 78 |
| Square Roots | p. 79 |
| Algorithms | p. 80 |
| Debugging | p. 81 |
| Glossary | p. 81 |
| Exercises | p. 82 |
| Strings | p. 85 |
| A String Is a Sequence | p. 85 |
| len | p. 86 |
| Traversal with a for Loop | p. 86 |
| String Slices | p. 87 |
| Strings Are Immutable | p. 88 |
| Searching | p. 89 |
| Looping and Counting | p. 89 |
| String Methods | p. 90 |
| The in Operator | p. 91 |
| String Comparison | p. 92 |
| Debugging | p. 92 |
| Glossary | p. 94 |
| exercises | p. 95 |
| Case Study: Word Play | p. 97 |
| Reading Word Lists | p. 97 |
| Exercises | p. 98 |
| Search | p. 99 |
| Looping with Indices | p. 100 |
| Debugging | p. 102 |
| Glossary | p. 102 |
| Exercises | p. 103 |
| Lists | p. 105 |
| A List Is a Sequence | p. 105 |
| Lists Are Mutable | p. 106 |
| Traversing a List | p. 107 |
| List Operations | p. 107 |
| List Slices | p. 108 |
| List Methods | p. 108 |
| Map, Filter, and Reduce | p. 109 |
| Deleting Elements | p. 111 |
| Lists and Strings | p. 112 |
| Objects and Values | p. 112 |
| Aliasing | p. 113 |
| List Arguments | p. 114 |
| Debugging | p. 116 |
| Glossary | p. 117 |
| Exercises | p. 118 |
| Dictionaries | p. 121 |
| Dictionary as a Set of Counters | p. 123 |
| Looping and Dictionaries | p. 124 |
| Reverse Lookup | p. 125 |
| Dictionaries and Lists | p. 126 |
| Memos | p. 128 |
| Global Variables | p. 129 |
| Long Integers | p. 130 |
| Debugging | p. 131 |
| Glossary | p. 132 |
| Tuples | p. 135 |
| Tuples Are Immutable | p. 135 |
| Tuple Assignment | p. 136 |
| Tuples as Return Values | p. 137 |
| Variable-Length Argument Tuples | p. 137 |
| Lists and Tuples | p. 138 |
| Dictionaries and Tuples | p. 139 |
| Comparing Tuples | p. 141 |
| Sequences of Sequences | p. 142 |
| Debugging | p. 143 |
| Glossary | p. 144 |
| Exercises | p. 144 |
| Case Study: Data Structure Selection | p. 147 |
| Word Frequency Analysis | p. 147 |
| Random Numbers | p. 148 |
| Word Histogram | p. 149 |
| Most Common Words | p. 150 |
| Optional Parameters | p. 151 |
| Dictionary Subtraction | p. 151 |
| Random Words | p. 152 |
| Markov Analysis | p. 153 |
| Data Structures | p. 154 |
| Debugging | p. 156 |
| Glossary | p. 157 |
| Exercises | p. 158 |
| Files | p. 159 |
| Persistence | p. 159 |
| Reading and Writing | p. 159 |
| Format Operator | p. 160 |
| Filenames and Paths | p. 161 |
| Catching Exceptions | p. 162 |
| Databases | p. 163 |
| Pickling | p. 164 |
| Pipes | p. 165 |
| Writing Modules | p. 166 |
| Debugging | p. 167 |
| Glossary | p. 168 |
| Classes and Objects | p. 171 |
| User-Defined Types | p. 171 |
| Attributes | p. 172 |
| Rectangles | p. 173 |
| Instances as Return Values | p. 174 |
| Objects Are Mutable | p. 175 |
| Copying | p. 176 |
| Debugging | p. 177 |
| Glossary | p. 178 |
| Exercises | p. 178 |
| Classes and Functions | p. 181 |
| Time | p. 181 |
| Pure Functions | p. 182 |
| Modifiers | p. 183 |
| Prototyping Versus Planning | p. 184 |
| Debugging | p. 185 |
| Glossary | p. 186 |
| Exercises | p. 187 |
| Classes and Methods | p. 189 |
| Object-Oriented Features | p. 189 |
| Printing Objects | p. 190 |
| Another Example | p. 191 |
| A More Complicated Example | p. 192 |
| The init Method | p. 192 |
| The_str_Method | p. 193 |
| Operator Overloading | p. 194 |
| Type-Based Dispatch | p. 194 |
| Polymorphism | p. 196 |
| Debugging | p. 197 |
| Interface and Implementation | p. 197 |
| Glossary | p. 198 |
| Exercises | p. 199 |
| Inheritance | p. 201 |
| Card Objects | p. 201 |
| Class Attributes | p. 202 |
| Comparing Cards | p. 204 |
| Decks | p. 205 |
| Printing the Deck | p. 205 |
| Add, Remove, Shuffle, and Sort | p. 206 |
| Inheritance | p. 207 |
| Class Diagrams | p. 209 |
| Debugging | p. 210 |
| Data Encapsulation | p. 211 |
| Glossary | p. 212 |
| Exercises | p. 213 |
| Case Study: Tkinter | p. 217 |
| GUI | p. 217 |
| Buttons and Callbacks | p. 218 |
| Canvas Widgets | p. 219 |
| Coordinate Sequences | p. 220 |
| More Widgets | p. 221 |
| Packing Widgets | p. 222 |
| Menus and Callables | p. 224 |
| Binding | p. 225 |
| Debugging | p. 227 |
| Glossary | p. 229 |
| Exercises | p. 230 |
| Debugging | p. 233 |
| Analysis of Algorithms | p. 243 |
| Lumpy | p. 255 |
| Index | p. 265 |
| Table of Contents provided by Ingram. All Rights Reserved. |
CART







