Example: dental hygienist

Think Python, 2E - DePaul University

Allen B. DowneyThink PythonHOW TO Think LIKE A COMPUTER SCIENTIST2nd EditionUpdated for python 3 Allen B. DowneyBostonThink PythonSECOND EDITION978-1-491-93936-9[LSI] Think Pythonby Allen B. DowneyCopyright 2016 Allen Downey. All rights in the United States of by O Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA Reilly books may be purchased for educational, business, or sales promotional use. Online editions arealso available for most titles ( ). For more information, contact our corporate/institutional sales department: 800-998-9938 or Meghan BlanchetteProduction Editor: Kristen BrownCopyeditor: Nan ReinhardtProofreader: Amanda KerseyIndexer: Allen DowneyInterior Designer: David FutatoCover Designer: Karen MontgomeryIllustrator: Rebecca DemarestAugust 2012: First EditionDecember 2015: Second EditionRevision History for the Second Edition2015-11-20: F

A Dictionary Is a Mapping 125 Dictionary as a Collection of Counters 127 ... Reverse Lookup 129 Dictionaries and Lists 130 ...

Tags:

  Reserve, Python, Dictionary

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Think Python, 2E - DePaul University

1 Allen B. DowneyThink PythonHOW TO Think LIKE A COMPUTER SCIENTIST2nd EditionUpdated for python 3 Allen B. DowneyBostonThink PythonSECOND EDITION978-1-491-93936-9[LSI] Think Pythonby Allen B. DowneyCopyright 2016 Allen Downey. All rights in the United States of by O Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA Reilly books may be purchased for educational, business, or sales promotional use. Online editions arealso available for most titles ( ). For more information, contact our corporate/institutional sales department: 800-998-9938 or Meghan BlanchetteProduction Editor: Kristen BrownCopyeditor: Nan ReinhardtProofreader: Amanda KerseyIndexer: Allen DowneyInterior Designer: David FutatoCover Designer: Karen MontgomeryIllustrator: Rebecca DemarestAugust 2012: First EditionDecember 2015: Second EditionRevision History for the Second Edition2015-11-20: First ReleaseSee for release O Reilly logo is a registered trademark of O Reilly Media, Inc.

2 Think python , the cover image of aCarolina parrot, and related trade dress are trademarks of O Reilly Media, the publisher and the author have used good faith efforts to ensure that the information andinstructions contained in this work are accurate, the publisher and the author disclaim all responsibilityfor errors or omissions, including without limitation responsibility for damages resulting from the use ofor reliance on this work. Use of the information and instructions contained in this work is at your ownrisk. If any code samples or other technology this work contains or describes is subject to open sourcelicenses or the intellectual property rights of others, it is your responsibility to ensure that your usethereof complies with such licenses and/or python is available under the Creative Commons Attribution-NonCommercial UnportedLicense.

3 The author maintains an online version at of ContentsPreface.. Way of the Program.. 1 What Is a Program? 1 Running python 2 The First Program 3 Arithmetic Operators 3 Values and Types

4 4 Formal and Natural Languages 5 Debugging 7 Glossary 8 Exercises , Expressions and Statements.. 11 Assignment Statements 11 Variable Names 12 Expressions and Statements 12 Script Mode 13 Order of Operations

5 14 String Operations 15 Comments 15 Debugging 16 Glossary 17 Exercises.

6 21 Function Calls 21 Math Functions 22iiiComposition 23 Adding New Functions 23 Definitions and Uses

7 25 Flow of Execution 25 Parameters and Arguments 26 Variables and Parameters Are Local 27 Stack Diagrams 28 Fruitful Functions and Void Functions 29 Why Functions?

8 30 Debugging 30 Glossary 31 Exercises Study: Interface Design.. 35 The turtle Module 35 Simple Repetition 37 Exercises 38 Encapsulation 38 Generalization

9 39 Interface Design 40 Refactoring 41A Development Plan 42docstring 43 Debugging 43 Glossary 44 Exercises and Recursion.

10 47 Floor Division and Modulus 47 Boolean Expressions 48 Logical Operators 49 Conditional Execution 49 Alternative Execution


Related search queries