Think PythonIf you want to learn how to program, working with Python is an excellent way to start. This hands-on guide takes you through the language one step at a time, beginning with basic programming concepts before moving on to functions, recursion, data structures, and object-oriented design. Through exercises in each chapter, you’ll try out programming concepts as you learn them. Think Python is ideal for students at the high school or college level, as well as self-learners, home-schooled students, and professionals who need to learn programming basics.
|
Contents
Chapter 1 The Way of the Program | 1 |
Chapter 2 Variables Expressions and Statements | 13 |
Chapter 3 Functions | 23 |
Interface Design | 37 |
Chapter 5 Conditionals and Recursion | 49 |
Chapter 6 Fruitful Functions | 61 |
Chapter 7 Iteration | 75 |
Chapter 8 Strings | 85 |
Chapter 14 Files | 159 |
Chapter 15 Classes and Objects | 171 |
Chapter 16 Classes and Functions | 181 |
Chapter 17 Classes and Methods | 189 |
Chapter 18 Inheritance | 201 |
Tkinter | 217 |
Appendix A Debugging | 233 |
Appendix B Analysis of Algorithms | 243 |
Other editions - View all
Common terms and phrases
algorithm argument assignment attributes banana built-in function button Canvas cards Chapter character circle Class Diagrams class object contains correct creates data structure Debugging Deck defined dictionary docstring elements error message example Exercises Exercise expression False fibonacci Figure flow of execution Formal languages Frame function called function definition function named global variable hashtable Here’s histogram http://thinkpython.com/code implementation import increment input inside class integer interface invoke Koch curve length letter LinearMap loop Lumpy maps math.pi modify module Object diagram object-oriented programming operands operator option order of growth output parameter Point polygon prefix print statement problem Python random Rectangle result return statement return True return value script sequence Solution spam stack diagram syntax error takes Tkinter traverses tuple Turtle TurtleWorld typo variable name widget word list Write a function Write a program