(eBook PDF) Practice of Computing Using Python, The 3rd Edition instant download
(eBook PDF) Practice of Computing Using Python, The 3rd Edition instant download
https://ebookluna.com/product/ebook-pdf-practice-of-
computing-using-python-the-3rd-edition/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookluna.com/product/ebook-pdf-introduction-to-programming-using-
python-an-1/
https://ebookluna.com/product/ebook-pdf-numerical-analysis-mathematics-of-
scientific-computing-3rd/
https://ebookluna.com/product/ebook-pdf-the-practice-of-creative-
writings-3rd-edition/
https://ebookluna.com/download/the-physics-of-computing-ebook-pdf/
(eBook PDF) The Doctor of Nursing Practice Essentials 3rd Edition
https://ebookluna.com/product/ebook-pdf-the-doctor-of-nursing-practice-
essentials-3rd-edition/
https://ebookluna.com/product/ebook-pdf-python-programming-in-context-3rd-
edition/
https://ebookluna.com/product/python-programming-in-context-3rd-edition-
ebook-pdf/
(eBook PDF) The Speaker: The Tradition and Practice of Public Speaking 3rd
https://ebookluna.com/product/ebook-pdf-the-speaker-the-tradition-and-
practice-of-public-speaking-3rd/
(eBook PDF) The Nurse, The Math, The Meds: Drug Calculations Using
Dimensional Analysis 3rd Edition
https://ebookluna.com/product/ebook-pdf-the-nurse-the-math-the-meds-drug-
calculations-using-dimensional-analysis-3rd-edition/
THE PRACTICE OF COMPUTING USING
3RD EDITION
WILLIAM RICHARD
PUNCH • ENBODY
C O N T E N T S
•
VIDEONOTES xxiv
PREFACE xxv
PREFACE TO THE SECOND EDITION xxix
1.0.1 Data Manipulation xxx
1.0.2 Problem Solving and Case Studies xxx
1.0.3 Code Examples xxx
1.0.4 Interactive Sessions xxxi
1.0.5 Exercises and Programming Projects xxxi
1.0.6 Self-Test Exercises xxxi
1.0.7 Programming Tips xxxi
vii
viii CONTENTS
P A R T 2 S TA RT I N G T O P R O G R A M 35
Chapter 1 Beginnings 37
1.1 Practice, Practice, Practice 37
1.2 QuickStart, the Circumference Program 38
1.2.1 Examining the Code 40
1.3 An Interactive Session 42
1.4 Parts of a Program 43
1.4.1 Modules 43
1.4.2 Statements and Expressions 43
1.4.3 Whitespace 45
1.4.4 Comments 46
1.4.5 Special Python Elements: Tokens 46
1.4.6 Naming Objects 48
1.4.7 Recommendations on Naming 49
1.5 Variables 49
1.5.1 Variable Creation and Assignment 50
1.6 Objects and Types 53
1.6.1 Numbers 55
1.6.2 Other Built-In Types 57
1.6.3 Object Types: Not Variable Types 58
1.6.4 Constructing New Values 60
CONTENTS ix
1.7 Operators 61
1.7.1 Integer Operators 61
1.7.2 Floating-Point Operators 64
1.7.3 Mixed Operations 64
1.7.4 Order of Operations and Parentheses 65
1.7.5 Augmented Assignment Operators: A Shortcut! 66
1.8 Your First Module, Math 68
1.9 Developing an Algorithm 69
1.9.1 New Rule—Testing 73
1.10 Visual Vignette: Turtle Graphics 74
1.11 What’s Wrong with My Code? 75
Chapter 2 Control 87
2.1 QuickStart Control 87
2.1.1 Selection 87
2.1.2 Booleans for Decisions 89
2.1.3 The if Statement 89
2.1.4 Example: What Lead Is Safe in Basketball? 92
2.1.5 Repetition 96
2.1.6 Example: Finding Perfect Numbers 100
2.1.7 Example: Classifying Numbers 105
2.2 In-Depth Control 109
2.2.1 True and False: Booleans 109
2.2.2 Boolean Variables 110
2.2.3 Relational Operators 110
2.2.4 Boolean Operators 115
2.2.5 Precedence 116
2.2.6 Boolean Operators Example 117
2.2.7 Another Word on Assignments 120
2.2.8 The Selection Statement for Decisions 122
2.2.9 More on Python Decision Statements 122
2.2.10 Repetition: the while Statement 126
2.2.11 Sentinel Loop 136
2.2.12 Summary of Repetition 136
2.2.13 More on the for Statement 137
2.2.14 Nesting 140
2.2.15 Hailstone Sequence Example 142
2.3 Visual Vignette: Plotting Data with Pylab 143
2.3.1 First Plot and Using a List 144
2.3.2 More Interesting Plot: A Sine Wave 145
x CONTENTS
P A R T 3 D AT A S T R U C T U R E S A N D F U N C T I O N S 187
Chapter 4 Working with Strings 189
4.1 The String Type 190
4.1.1 The Triple-Quote String 190
4.1.2 Nonprinting Characters 191
4.1.3 String Representation 191
4.1.4 Strings as a Sequence 192
4.1.5 More Indexing and Slicing 193
4.1.6 Strings Are Iterable 198
CONTENTS xi
P A R T 4 C L A S S E S , M A K I N G Y O U R O W N D AT A S T R U C T U R E S
AND ALGORITHMS 527
Chapter 11 Introduction to Classes 529
11.1 QuickStart: Simple Student Class 529
11.2 Object-Oriented Programming 530
11.2.1 Python Is Object-Oriented! 530
11.2.2 Characteristics of OOP 531
11.3 Working with OOP 531
11.3.1 Class and Instance 531
11.4 Working with Classes and Instances 532
11.4.1 Built-In Class and Instance 532
11.4.2 Our First Class 534
11.4.3 Changing Attributes 536
11.4.4 The Special Relationship Between an Instance and
Class: instance-of 537
11.5 Object Methods 540
11.5.1 Using Object Methods 540
11.5.2 Writing Methods 541
11.5.3 The Special Argument self 542
11.5.4 Methods Are the Interface to a Class Instance 544
11.6 Fitting into the Python Class Model 545
11.6.1 Making Programmer-Defined Classes 545
11.6.2 A Student Class 545
11.6.3 Python Standard Methods 546
11.6.4 Now There Are Three: Class Designer, Programmer,
and User 550
11.7 Example: Point Class 551
11.7.1 Construction 553
11.7.2 Distance 553
11.7.3 Summing Two Points 553
11.7.4 Improving the Point Class 554
11.8 Python and OOP 558
11.8.1 Encapsulation 558
11.8.2 Inheritance 559
11.8.3 Polymorphism 559
11.9 Python and Other OOP Languages 559
11.9.1 Public versus Private 559
11.9.2 Indicating Privacy Using Double Underscores (__) 560
CONTENTS xvii
APPENDICES 753
Appendix A Getting and Using Python 753
A.1 About Python 753
A.1.1 History 753
A.1.2 Python 3 753
A.1.3 Python Is Free and Portable 754
A.1.4 Installing Anaconda 756
A.1.5 Starting Our Python IDE: Spyder 756
A.1.6 Working with Python 757
A.1.7 Making a Program 760
A.2 The IPython Console 762
A.2.1 Anatomy of an iPython Session 763
A.2.2 Your Top Three iPython Tips 764
A.2.3 Completion and the Tab Key 764
A.2.4 The ? Character 766
A.2.5 More iPython Tips 766
A.3 Some Conventions for This Book 769
A.3.1 Interactive Code 770
A.3.2 Program: Written Code 770
A.3.3 Combined Program and Output 770
A.4 Summary 771
Appendix B Simple Drawing with Turtle Graphics 773
B.0.1 What Is a Turtle? 773
B.0.2 Motion 775
B.0.3 Drawing 775
B.0.4 Color 777
B.0.5 Drawing with Color 779
B.0.6 Other Commands 781
B.1 Tidbits 783
B.1.1 Reset/Close the Turtle Window 783
Appendix C What’s Wrong with My Code? 785
C.1 It’s Your Fault! 785
C.1.1 Kinds of Errors 785
C.1.2 “Bugs” and Debugging 787
C.2 Debugging 789
C.2.1 Testing for Correctness 789
C.2.2 Probes 789
C.2.3 Debugging with Spyder Example 1 789
C.2.4 Debugging Example 1 Using print() 793
Discovering Diverse Content Through
Random Scribd Documents
inguinibus meis viridis urticae fascem comprehendit, omniaque infra
umbilicum coepit lenta manu caedere. Upon which jumping from her,
to avoid the sting, I made off. The old woman in a great rage
pursu’d me, and tho’ drunk with wine, and their more hot desires,
took the right way; and follow’d me through two or three villages,
crying stop thief; but with my hands all bloody, in the hasty flight, I
got off.
National
Gallery of
Art
THE KISS
by Rodin
Metropolitan Museum of
Art
by Rodin
The ancient cult of Bacchus, the god of wine and fertility, was
marked by highly erotic rites and orgies and phallic manifestations.
Bacchus himself was equated with the Greek god Dionysus, whose
characteristics and functions were identical. Dionysus himself was
associated with certain animals that were reputedly extremely
lascivious by nature or erotically exceptionally dominant. Among
these animals were: the bull, the ass, the panther, and the goat. The
right testis of the ass, for instance, worn in a bracelet, was,
according to the testimony of Pliny the Elder, who produced an
encyclopedic Natural History, and the Greek physician Dioscorides,
considered an effective sexual stimulant.
In many regions of ancient Greece, both on the mainland but
particularly in the islands of the Aegean Sea, the Dionysiac cult was
prevalent and passionately celebrated.
Euripides, the Greek tragic poet, presents a detailed and
authoritative picture of Bacchic ceremonies and beliefs in his drama
The Bacchae.
The oil extracted from the fresh leaves of the ruta graveolens
plant produces an amatory excitation.
In one of the bucolic Idyls of the Greek poet Theocritus (c. 310–
c. 250 B.C.) the maiden Simaetha, in love with Delphis, who has
abandoned her, attempts to regain his love by performing certain
magic rites and making invocations to Selene, Aphrodite, and the
horrendous Hecate.
She fashions a wax image of Delphis and by sympathetic magic
anticipates the melting of his heart in correspondence with the
melting of the image.
In addition, she makes use of the magic wheel, and her refrain
throughout the performance is:
My magic wheel, draw home to me
The man I love!
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookluna.com