Introduction to computation and programming using Python:
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Cambridge, Mass. [u.a.]
MIT Press
2013
|
Ausgabe: | rev. and expanded ed. |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | "This book is based on an MIT course that has been offered twice a year since 2006"--Preface |
Beschreibung: | XIV, 298 S. Ill., graph. Darst. |
ISBN: | 9780262525008 0262525003 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV040891576 | ||
003 | DE-604 | ||
005 | 20140108 | ||
007 | t | ||
008 | 130318s2013 ad|| |||| 00||| eng d | ||
020 | |a 9780262525008 |9 978-0-262-52500-8 | ||
020 | |a 0262525003 |9 0-262-52500-3 | ||
035 | |a (OCoLC)835580043 | ||
035 | |a (DE-599)BVBBV040891576 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-29T |a DE-83 |a DE-91G | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a DAT 366f |2 stub | ||
100 | 1 | |a Guttag, John V. |e Verfasser |4 aut | |
245 | 1 | 0 | |a Introduction to computation and programming using Python |c John V. Guttag |
250 | |a rev. and expanded ed. | ||
264 | 1 | |a Cambridge, Mass. [u.a.] |b MIT Press |c 2013 | |
300 | |a XIV, 298 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
500 | |a "This book is based on an MIT course that has been offered twice a year since 2006"--Preface | ||
650 | 0 | 7 | |a Informatik |0 (DE-588)4026894-9 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Python |g Programmiersprache |0 (DE-588)4434275-5 |2 gnd |9 rswk-swf |
655 | 7 | |8 1\p |0 (DE-588)4123623-3 |a Lehrbuch |2 gnd-content | |
689 | 0 | 0 | |a Python |g Programmiersprache |0 (DE-588)4434275-5 |D s |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Informatik |0 (DE-588)4026894-9 |D s |
689 | 1 | |8 2\p |5 DE-604 | |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025871219&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-025871219 | ||
883 | 1 | |8 1\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk | |
883 | 1 | |8 2\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk |
Datensatz im Suchindex
_version_ | 1804150174065360896 |
---|---|
adam_text | Titel: Introduction to computation and programming using Python
Autor: Guttag, John V
Jahr: 2013
CONTENTS
PREFACE.......................................................................................................xiii
ACKNOWLEDGMENTS.....................................................................................xv
1 GETTING STARTED....................................................................................1
2 INTRODUCTION TO PYTHON......................................................................7
2.1 The Basic Elements of Python...............................................................8
2.1.1 Objects, Expressions, and Numerical Types....................................9
2.1.2 Variables and Assignment............................................................11
2.1.3 IDLE............................................................................................13
2.2 Branching Programs........................................................................... 14
2.3 Strings and Input...............................................................................16
2.3.1 Input............................................................................................18
2.4 Iteration..............................................................................................18
3 SOME SIMPLE NUMERICAL PROGRAMS..................................................21
3.1 Exhaustive Enumeration....................................................................21
3.2 For Loops............................................................................................23
3.3 Approximate Solutions and Bisection Search......................................25
3.4 A Few Words About Using Floats........................................................29
3.5 Newton-Raphson................................................................................32
4 FUNCTIONS, SCOPING, and ABSTRACTION.............................................34
4.1 Functions and Scoping.......................................................................35
4.1.1 Function Definitions.....................................................................35
4.1.2 Keyword Arguments and Default Values.......................................36
4.1.3 Scoping........................................................................................37
4.2 Specifications.....................................................................................41
4.3 Recursion...........................................................................................44
4.3.1 Fibonacci Numbers......................................................................45
4.3.2 Palindromes.................................................................................48
4.4 Global Variables.................................................................................50
4.5 Modules..............................................................................................51
4.6 Files...................................................................................................53
5 STRUCTURED TYPES, MUTABILITY, AND HIGHER-ORDER FUNCTIONS.. 56
5.1 Tuples................................................................................................56
5.1.1 Sequences and Multiple Assignment.............................................57
5.2 Lists and Mutability............................................................................58
5.2.1 Cloning........................................................................................63
5.2.2 List Comprehension.....................................................................63
5.3 Functions as Objects..........................................................................64
5.4 Strings, Tuples, and Lists...................................................................66
5.5 Dictionaries........................................................................................67
6 TESTING AND DEBUGGING......................................................................70
6.1 Testing................................................................................................70
6.1.1 Black-Box Testing........................................................................71
6.1.2 Glass-Box Testing........................................................................73
6.1.3 Conducting Tests.........................................................................74
6.2 Debugging..........................................................................................76
6.2.1 Learning to Debug........................................................................78
6.2.2 Designing the Experiment............................................................79
6.2.3 When the Going Gets Tough.........................................................81
6.2.4 And When You Have Found The Bug..........................................82
7 EXCEPTIONS AND ASSERTIONS..............................................................84
7.1 Handling Exceptions...........................................................................84
7.2 Exceptions as a Control Flow Mechanism...........................................87
7.3 Assertions...........................................................................................90
8 CLASSES AND OBJECT-ORIENTED PROGRAMMING...............................91
8.1 Abstract Data Types and Classes........................................................91
8.1.1 Designing Programs Using Abstract Data Types............................96
8.1.2 Using Classes to Keep Track of Students and Faculty...................96
8.2 Inheritance.........................................................................................99
8.2.1 Multiple Levels of Inheritance..................................................... 101
8.2.2 The Substitution Principle..........................................................102
8.3 Encapsulation and Information Hiding.............................................. 103
8.3.1 Generators.................................................................................106
8.4 Mortgages, an Extended Example.....................................................108
ix
9 A SIMPLISTIC INTRODUCTION TO ALGORITHMIC COMPLEXITY............113
9.1 Thinking About Computational Complexity.......................................113
9.2 Asymptotic Notation..........................................................................116
9.3 Some Important Complexity Classes.................................................118
9.3.1 Constant Complexity..................................................................118
9.3.2 Logarithmic Complexity..............................................................118
9.3.3 Linear Complexity......................................................................119
9.3.4 Log-Linear Complexity................................................................120
9.3.5 Polynomial Complexity...............................................................120
9.3.6 Exponential Complexity..............................................................121
9.3.7 Comparisons of Complexity Classes............................................123
10 SOME SIMPLE ALGORITHMS AND DATA STRUCTURES.........................125
10.1 Search Algorithms..........................................................................126
10.1.1 Linear Search and Using Indirection to Access Elements..........126
10.1.2 Binaiy Search and Exploiting Assumptions..............................128
10.2 Sorting Algorithms..........................................................................131
10.2.1 Merge Sort................................................................................132
10.2.2 Exploiting Functions as Parameters..........................................135
10.2.3 Sorting in Python.....................................................................136
10.3 Hash Tables....................................................................................137
11 PLOTTING AND MORE ABOUT CLASSES................................................141
11.1 Plotting Using PyLab.......................................................................141
11.2 Plotting Mortgages, an Extended Example.......................................146
12 STOCHASTIC PROGRAMS, PROBABILITY, AND STATISTICS...................152
12.1 Stochastic Programs.......................................................................153
12.2 Inferential Statistics and Simulation...............................................155
12.3 Distributions.................................................................................. 166
12.3.1 Normal Distributions and Confidence Levels.............................168
12.3.2 Uniform Distributions..............................................................170
12.3.3 Exponential and Geometric Distributions................................. 171
12.3.4 Benford s Distribution..............................................................173
12.4 How Often Does the Better Team Win?............................................ 174
12.5 Hashing and Collisions................................................................... 177
X
13 RANDOM WALKS AND MORE ABOUT DATA VISUALIZATION................. 179
13.1 The Drunkard s Walk......................................................................179
13.2 Biased Random Walks.................................................................... 186
13.3 Treacherous Fields.......................................................................... 191
14 MONTE CARLO SIMULATION.................................................................. 193
14.1 Pascal s Problem............................................................................. 194
14.2 Pass or Don t Pass?......................................................................... 195
14.3 Using Table Lookup to Improve Performance................................... 199
14.4 Finding jc........................................................................................200
14.5 Some Closing Remarks About Simulation Models............................204
15 UNDERSTANDING EXPERIMENTAL DATA..............................................207
15.1 The Behavior of Springs..................................................................207
15.1.1 Using Linear Regression to Find a Fit.......................................210
15.2 The Behavior of Projectiles..............................................................214
15.2.1 Coefficient of Determination.....................................................216
15.2.2 Using a Computational Model...................................................217
15.3 Fitting Exponentially Distributed Data............................................218
15.4 When Theory Is Missing..................................................................221
16 LIES, DAMNED LIES, AND STATISTICS..................................................222
16.1 Garbage In Garbage Out (GIGO)......................................................222
16.2 Pictures Can Be Deceiving..............................................................223
16.3 Cum Hoc Ergo Propter Hoc...............................................................225
16.4 Statistical Measures Don t Tell the Whole Story...............................226
16.5 Sampling Bias.................................................................................228
16.6 Context Matters..............................................................................229
16.7 Beware of Extrapolation..................................................................229
16.8 The Texas Sharpshooter Fallacy......................................................230
16.9 Percentages Can Confuse................................................................232
16.10 Just Beware..................................................................................233
17 KNAPSACK AND GRAPH OPTIMIZATION PROBLEMS..............................234
17.1 Knapsack Problems........................................................................234
17.1.1 Greedy Algorithms....................................................................235
17.1.2 An Optimal Solution to the 0/1 Knapsack Problem...................238
xi
17.2 Graph Optimization Problems.........................................................240
17.2.1 Some Classic Graph-Theoretic Problems...................................244
17.2.2 The Spread of Disease and Min Cut..........................................245
17.2.3 Shortest Path: Depth-First Search and Breadth-First Search.... 246
18 DYNAMIC PROGRAMMING.....................................................................252
18.1 Fibonacci Sequences, Revisited.......................................................252
18.2 Dynamic Programming and the 0/1 Knapsack Problem...................254
18.3 Dynamic Programming and Divide-and-Conquer.............................261
19 A QUICK LOOK AT MACHINE LEARNING................................................262
19.1 Feature Vectors..............................................................................264
19.2 Distance Metrics.............................................................................266
19.3 Clustering.......................................................................................270
19.4 Types Example and Cluster.............................................................272
19.5 K-means Clustering........................................................................274
19.6 A Contrived Example......................................................................276
19.7 A Less Contrived Example...............................................................280
19.8 Wrapping Up...................................................................................286
PYTHON 2.7 QUICK REFERENCE.................................................................287
INDEX..........................................................................................................289
|
any_adam_object | 1 |
author | Guttag, John V. |
author_facet | Guttag, John V. |
author_role | aut |
author_sort | Guttag, John V. |
author_variant | j v g jv jvg |
building | Verbundindex |
bvnumber | BV040891576 |
classification_rvk | ST 250 |
classification_tum | DAT 366f |
ctrlnum | (OCoLC)835580043 (DE-599)BVBBV040891576 |
discipline | Informatik |
edition | rev. and expanded ed. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01813nam a2200433 c 4500</leader><controlfield tag="001">BV040891576</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20140108 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">130318s2013 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780262525008</subfield><subfield code="9">978-0-262-52500-8</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0262525003</subfield><subfield code="9">0-262-52500-3</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)835580043</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV040891576</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-29T</subfield><subfield code="a">DE-83</subfield><subfield code="a">DE-91G</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 366f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Guttag, John V.</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Introduction to computation and programming using Python</subfield><subfield code="c">John V. Guttag</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">rev. and expanded ed.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Cambridge, Mass. [u.a.]</subfield><subfield code="b">MIT Press</subfield><subfield code="c">2013</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XIV, 298 S.</subfield><subfield code="b">Ill., graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">"This book is based on an MIT course that has been offered twice a year since 2006"--Preface</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Informatik</subfield><subfield code="0">(DE-588)4026894-9</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Python</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4434275-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="8">1\p</subfield><subfield code="0">(DE-588)4123623-3</subfield><subfield code="a">Lehrbuch</subfield><subfield code="2">gnd-content</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Python</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4434275-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Informatik</subfield><subfield code="0">(DE-588)4026894-9</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="8">2\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025871219&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-025871219</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">2\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield></record></collection> |
genre | 1\p (DE-588)4123623-3 Lehrbuch gnd-content |
genre_facet | Lehrbuch |
id | DE-604.BV040891576 |
illustrated | Illustrated |
indexdate | 2024-07-10T00:34:43Z |
institution | BVB |
isbn | 9780262525008 0262525003 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-025871219 |
oclc_num | 835580043 |
open_access_boolean | |
owner | DE-29T DE-83 DE-91G DE-BY-TUM |
owner_facet | DE-29T DE-83 DE-91G DE-BY-TUM |
physical | XIV, 298 S. Ill., graph. Darst. |
publishDate | 2013 |
publishDateSearch | 2013 |
publishDateSort | 2013 |
publisher | MIT Press |
record_format | marc |
spelling | Guttag, John V. Verfasser aut Introduction to computation and programming using Python John V. Guttag rev. and expanded ed. Cambridge, Mass. [u.a.] MIT Press 2013 XIV, 298 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier "This book is based on an MIT course that has been offered twice a year since 2006"--Preface Informatik (DE-588)4026894-9 gnd rswk-swf Python Programmiersprache (DE-588)4434275-5 gnd rswk-swf 1\p (DE-588)4123623-3 Lehrbuch gnd-content Python Programmiersprache (DE-588)4434275-5 s DE-604 Informatik (DE-588)4026894-9 s 2\p DE-604 HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025871219&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis 1\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk 2\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk |
spellingShingle | Guttag, John V. Introduction to computation and programming using Python Informatik (DE-588)4026894-9 gnd Python Programmiersprache (DE-588)4434275-5 gnd |
subject_GND | (DE-588)4026894-9 (DE-588)4434275-5 (DE-588)4123623-3 |
title | Introduction to computation and programming using Python |
title_auth | Introduction to computation and programming using Python |
title_exact_search | Introduction to computation and programming using Python |
title_full | Introduction to computation and programming using Python John V. Guttag |
title_fullStr | Introduction to computation and programming using Python John V. Guttag |
title_full_unstemmed | Introduction to computation and programming using Python John V. Guttag |
title_short | Introduction to computation and programming using Python |
title_sort | introduction to computation and programming using python |
topic | Informatik (DE-588)4026894-9 gnd Python Programmiersprache (DE-588)4434275-5 gnd |
topic_facet | Informatik Python Programmiersprache Lehrbuch |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025871219&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT guttagjohnv introductiontocomputationandprogrammingusingpython |