ENGLISH

Fundamentals of Python Programming

Book information

Publisher
Southern Adventist University
Year
2019
Language
english
Format
PDF
Filesize
10 MB (9980908 bytes)
Pages
669\669
Time added
2019-07-25 13:42:27

Description

The Context of Software Development......Page 12 Development Tools......Page 13 Learning Programming with Python......Page 15 Writing a Python Program......Page 16 The Python Interactive Shell......Page 20 A Longer Python program......Page 22 Exercises......Page 23 Integer and String Values......Page 24 Variables and Assignment......Page 28 Identifiers......Page 35 Floating-point Numbers......Page 37 Control Codes within Strings......Page 41 User Input......Page 42 Controlling the print Function......Page 45 String Formatting......Page 46 Multi-line Strings......Page 50 Exercises......Page 51 Expressions......Page 54 Operator Precedence and Associativity......Page 60 Formatting Expressions......Page 62 Comments......Page 63 Syntax Errors......Page 64 Run-time Exceptions......Page 65 Logic Errors......Page 67 Arithmetic Examples......Page 68 More Arithmetic Operators......Page 70 Algorithms......Page 72 Exercises......Page 73 Boolean Expressions......Page 78 Boolean Expressions......Page 79 The Simple if Statement......Page 80 The if/else Statement......Page 86 Compound Boolean Expressions......Page 88 The pass Statement......Page 91 Floating-point Equality......Page 93 Nested Conditionals......Page 94 Multi-way Decision Statements......Page 104 Multi-way Versus Sequential Conditionals......Page 108 Conditional Expressions......Page 110 Errors in Conditional Statements......Page 113 Logic Complexity......Page 116 Exercises......Page 118 The while Statement......Page 124 Definite Loops vs. Indefinite Loops......Page 132 The for Statement......Page 133 Nested Loops......Page 137 Abnormal Loop Termination......Page 143 The break statement......Page 144 The continue Statement......Page 147 while/else and for/else......Page 148 Infinite Loops......Page 150 Computing Square Root......Page 154 Drawing a Tree......Page 155 Printing Prime Numbers......Page 157 Exercises......Page 161 Using Functions......Page 168 Introduction to Using Functions......Page 169 Functions and Modules......Page 173 The Built-in Functions......Page 175 Standard Mathematical Functions......Page 178 time Functions......Page 181 Random Numbers......Page 184 The eval and exec Functions......Page 187 Turtle Graphics......Page 190 Other Techniques for Importing Functions and Modules......Page 196 Exercises......Page 202 Writing Functions......Page 204 Function Basics......Page 205 Parameter Passing......Page 220 Documenting Functions......Page 222 Better Organized Prime Generator......Page 224 Command Interpreter......Page 226 Restricted Input......Page 227 Better Die Rolling Simulator......Page 229 Tree Drawing Function......Page 230 Floating-point Equality......Page 231 Refactoring to Eliminate Code Duplication......Page 233 Custom Functions vs. Standard Functions......Page 235 Exercises......Page 238 Global Variables......Page 244 Default Parameters......Page 249 Introduction to Recursion......Page 252 Making Functions Reusable......Page 257 Functions as Data......Page 260 Separating Concerns with Pluggable Modules......Page 264 Lambda Expressions......Page 284 Generators......Page 289 Local Function Definitions......Page 297 Decorators......Page 303 Partial Application......Page 314 Exercises......Page 317 Using Objects......Page 322 String Objects......Page 323 File Objects......Page 327 Fraction Objects......Page 334 Turtle Graphics Objects......Page 336 Graphics with tkinter Objects......Page 337 Object Mutability and Aliasing......Page 343 Garbage Collection......Page 347 Exercises......Page 348 Lists......Page 350 Using Lists......Page 352 List Traversal......Page 356 Building Lists......Page 357 List Membership......Page 362 List Assignment and Equivalence......Page 363 List Bounds......Page 368 Slicing......Page 369 List Element Removal......Page 372 Lists and Functions......Page 373 List Methods......Page 374 Prime Generation with a List......Page 377 Command-line Arguments......Page 379 List Comprehensions......Page 380 Multidimensional Lists......Page 386 Summary of List Creation Techniques......Page 395 Exercises......Page 396 Tuples......Page 400 Arbitrary Argument Lists......Page 404 Dictionaries......Page 409 Using Dictionaries......Page 413 Counting with Dictionaries......Page 415 Grouping with Dictionaries......Page 419 Keyword Arguments......Page 422 Sets......Page 425 Set Quantification with all and any......Page 426 Enumerating the Elements of a Data Structure......Page 430 Exercises......Page 432 Motivation......Page 436 Common Standard Exceptions......Page 437 Handling Exceptions......Page 439 Handling Multiple Exceptions......Page 442 The Catch-all Handler......Page 443 Catching Exception Objects......Page 447 Exception Handling Scope......Page 448 Raising Exceptions......Page 457 The try Statement's Optional else Block......Page 462 finally block......Page 464 Using Exceptions Wisely......Page 468 Exercises......Page 469 Circle Objects......Page 474 Restricting Access to Members......Page 484 Rational Numbers......Page 485 Bank Account Objects......Page 490 Timing Objects......Page 494 Traffic Light Objects......Page 497 Automated Testing......Page 503 Plotting Data......Page 508 Dynamic Content......Page 513 Class Variables......Page 517 Exercises......Page 518 Composition......Page 524 Class Inheritance......Page 529 Composition vs. Inheritance......Page 548 Multiple Inheritance......Page 551 Unit Testing......Page 569 Custom Exceptions......Page 574 Exercises......Page 576 Good Algorithms Versus Bad Algorithms......Page 578 Sorting......Page 587 Flexible Sorting......Page 590 Linear Search......Page 593 Binary Search......Page 595 Recursion Revisited......Page 604 List Permutations......Page 611 Randomly Permuting a List......Page 620 Reversing a List......Page 625 Memoization......Page 626 Exercises......Page 638 Introduction to Graphs......Page 642 Path Finding......Page 646 Breadth-first Search......Page 648 Depth-first Search......Page 658 Index......Page 665

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF