| |
| |
| |
Data Manipulation | |
| |
| |
| |
Problem Solving and Case Studies | |
| |
| |
| |
Code examples | |
| |
| |
| |
Interactive Sessions | |
| |
| |
| |
Exercises and Programming Projects | |
| |
| |
| |
Self-Test Exercises | |
| |
| |
| |
Programming Tips | |
| |
| |
| |
Thinking About Computing | |
| |
| |
| |
the Study of Computer Science | |
| |
| |
| |
Why Computer Science? | |
| |
| |
| |
Importance of Computer Science | |
| |
| |
| |
Computer Science Around You | |
| |
| |
| |
Computer "Science" | |
| |
| |
| |
Computer Science Through Computer Programming | |
| |
| |
| |
the Difficulty and Promise of Programming | |
| |
| |
| |
Difficulty 1: Two Things at Once | |
| |
| |
A une Damoyselle malade | |
| |
| |
My Sweet/Cute [One] (Feminine) | |
| |
| |
A une Damoyselle malade | |
| |
| |
My Sweet Dear | |
| |
| |
A une Damoyselle malade | |
| |
| |
| |
Difficulty 2: What is a Good Program? | |
| |
| |
| |
the Promise of a Computer Program | |
| |
| |
| |
Choosing a Computer Language | |
| |
| |
| |
Different Computer Languages | |
| |
| |
| |
Why Python? | |
| |
| |
| |
Is Python the Best Language? | |
| |
| |
| |
What Is Computation? | |
| |
| |
| |
What Is a computer? | |
| |
| |
| |
Computation in Nature | |
| |
| |
| |
the Human Computer | |
| |
| |
| |
the Modern, Electronic Computer | |
| |
| |
| |
It's the Switch! | |
| |
| |
| |
the Transistor | |
| |
| |
| |
A High-Level Look at a Modern Computer | |
| |
| |
| |
Representing Data | |
| |
| |
| |
Binary Data | |
| |
| |
| |
Working with Binary | |
| |
| |
| |
Limits | |
| |
| |
| |
Representing Letters | |
| |
| |
| |
Representing Other Data | |
| |
| |
| |
What Does a Number Represent? | |
| |
| |
| |
How to Talk About Quantities of Data | |
| |
| |
| |
How Much Data is That? | |
| |
| |
| |
Overview of Coming Chapters | |
| |
| |
| |
Starting to Program | |
| |
| |
| |
Beginnings | |
| |
| |
| |
Practice, Practice, Practice | |
| |
| |
| |
QuickStart, the Circumference Program | |
| |
| |
| |
Examining the code | |
| |
| |
| |
An Interactive Session | |
| |
| |
| |
Parts of a Program | |
| |
| |
| |
Modules | |
| |
| |
| |
Statements and Expressions | |
| |
| |
| |
Whitespace | |
| |
| |
| |
Comments | |
| |
| |
| |
Special Python Elements: Tokens | |
| |
| |
| |
Naming Objects | |
| |
| |
| |
Recommendations on Naming | |
| |
| |
| |
Variables | |
| |
| |
| |
Variable Creation and Assignment | |
| |
| |
| |
Objects and Types | |
| |
| |
| |
Numbers | |
| |
| |
| |
Other Built-In Types | |
| |
| |
| |
Object types: not variable types | |
| |
| |
| |
Constructing New Values | |
| |
| |
| |
Operators | |
| |
| |
| |
Integer Operators | |
| |
| |
| |
Floating Point Operators | |
| |
| |
| |
Mixed Operations | |
| |
| |
| |
Order of Operations and Parentheses | |
| |
| |
| |
Augmented Assignment Operators: A Shortcut! | |
| |
| |
| |
Your First Module, Math | |
| |
| |
| |
Developing an Algorithm | |
| |
| |
| |
New rule, testing | |
| |
| |
| |
Visual Vignette: Turtle Graphics | |
| |
| |
| |
Exercises | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
Control | |
| |
| |
| |
the Selection Statement for Decisions: if | |
| |
| |
| |
Booleans for Decisions | |
| |
| |
| |
the if Statement | |
| |
| |
| |
Example: What Lead is Safe in Basketball? | |
| |
| |
| |
Repetition | |
| |
| |
| |
Example: Finding Perfect Numbers | |
| |
| |
| |
Example: Classifying Numbers | |
| |
| |
| |
In-Depth Control | |
| |
| |
| |
True and False: Booleans | |
| |
| |
| |
Boolean Variables | |
| |
| |
| |
Relational Operators | |
| |
| |
| |
Boolean Operators | |
| |
| |
| |
Precedence | |
| |
| |
| |
Boolean Operators Example | |
| |
| |
| |
Another Word on Assignments | |
| |
| |
| |
the Selection Statement for Decisions | |
| |
| |
| |
More on Python Decision Statements | |
| |
| |
| |
Repetition: the while Statement | |
| |
| |
| |
Sentinel Loop | |
| |
| |
| |
Summary of Repetition | |
| |
| |
| |
More on the for Statement | |
| |
| |
| |
Nesting | |
| |
| |
| |
Hailstone Sequence Example | |
| |
| |
| |
Visual Vignette: Plotting Data with pylab | |
| |
| |
| |
First Plot and Using a List | |
| |
| |
| |
More Interesting Plot: a Sine Wave | |
| |
| |
| |
Computer Science Perspectives | |
| |
| |
| |
Minimal Universal Computing | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
Algorithms and Program Development | |
| |
| |
| |
What Is an Algorithm? | |
| |
| |
| |
Example Algorithms | |
| |
| |
| |
Algorithm Features | |
| |
| |
| |
Algorithm versus Program | |
| |
| |
| |
Qualities of an Algorithm | |
| |
| |
| |
Can We Really Do All That? | |
| |
| |
| |
What is a Program? | |
| |
| |
| |
Readability | |
| |
| |
| |
Robust | |
| |
| |
| |
Correctness | |
| |
| |
| |
Strategies for Program Design ... | |
| |
| |
| |
Engage and Commit 116634 | |
| |
| |
| |
Understand, Then Visualize | |
| |
| |
| |
Think Before You Program | |
| |
| |
| |
Experiment | |
| |
| |
| |
Simplify | |
| |
| |
| |
Stop and Think | |
| |
| |
| |
Relax: Give Yourself a Break | |
| |
| |
| |
A Simple Example | |
| |
| |
| |
Build the Skeleton | |
| |
| |
| |
Output | |
| |
| |
| |
Input | |
| |
| |
| |
Doing the Calculation | |
| |
| |
| |
Working with Strings | |
| |
| |
| |
the String Type | |
| |
| |
| |
the Triple Quote String | |
| |
| |
| |
Non Printing Characters | |
| |
| |
| |
String Representation | |
| |
| |
| |
Strings as a Sequence | |
| |
| |
| |
More Indexing and Slicing | |
| |
| |
| |
Strings are Iterable | |
| |
| |
| |
String Operations | |
| |
| |
| |
Concatenation (+) and Repetition (*) | |
| |
| |
| |
Determining When + Indicates Addition or Concatenation? | |
| |
| |
| |
Comparison Operators | |
| |
| |
| |
the in Operator | |
| |
| |
| |
String Collections are Immutable | |
| |
| |
| |
A Preview of Functions and Methods | |
| |
| |
| |
First Cut: What is a Function? | |
| |
| |
| |
A String Method | |
| |
| |
| |
Determining Method Names and Method Arguments | |
| |
| |
| |
String Methods | |
| |
| |
| |
String Functions | |
| |
| |
| |
Formatted Output for Strings | |
| |
| |
| |
Descriptor Codes | |
| |
| |
| |
Width and Alignment Descriptors | |
| |
| |
| |
Floating-Point Precision Descriptor | |
| |
| |
| |
Control and Strings | |
| |
| |
| |
Working with Strings | |
| |
| |
| |
Example: Reordering a Person's Name | |
| |
| |
| |
Palindromes | |
| |
| |
| |
More String Formatting | |
| |
| |
| |
Computer Science Perspectives | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
Files and Exceptions I | |
| |
| |
| |
What is a File? | |
| |
| |
| |
Accessing Files: Reading Text Files | |
| |
| |
| |
What's Really Happening? | |
| |
| |
| |
Accessing Files: Writing Text Files | |
| |
| |
| |
Reading and Writing Text Files | |
| |
| |
| |
File Creation and Overwriting | |
| |
| |
| |
First Cut, Handling Errors | |
| |
| |
| |
Error Names | |
| |
| |
| |
the try-except construct | |
| |
| |
| |
try-except Flow of Control | |
| |
| |
| |
Exception example | |
| |
| |
| |
Example: Counting Poker Hands | |
| |
| |
| |
Program to Count Poker Hands | |
| |
| |
| |
Functions and Data Structures | |
| |
| |
| |
Functions-QuickStart | |
| |
| |
| |
What Is a Function? | |
| |
| |
| |
Why Have Functions? | |
| |
| |
| |
Python Functions | |
| |
| |
| |
Flow of Control with Functions | |
| |
| |
| |
Function Flow in Detail | |
| |
| |
| |
Parameter Passing | |
| |
| |
| |
Another Function Example | |
| |
| |
| |
Function Example: Word Puzzle | |
| |
| |
| |
Functions Calling Functions | |
| |
| |
| |
When to Use a Function | |
| |
| |
| |
What If There is No Return Statement? | |
| |
| |
| |
What If There Are Multiple Return Statements? | |
| |
| |
| |
Visual Vignette: Turtle Flag | |
| |
| |
| |
Lists and Tuples | |
| |
| |
| |
What Is a List? | |
| |
| |
| |
What You Already Know How to Do With Lists | |
| |
| |
| |
Iteration | |
| |
| |
| |
Indexing and Slicing | |
| |
| |
| |
Operators | |
| |
| |
| |
Functions | |
| |
| |
| |
List Iteration | |
| |
| |
| |
Lists are different than Strings | |
| |
| |
| |
Lists are Mutable | |
| |
| |
| |
List Methods | |
| |
| |
| |
Old and New Friends | |
| |
| |
| |
Split and Multiple Assignment | |
| |
| |
| |
List to String and Back Again, Using join | |
| |
| |
| |
the Sorted Function | |
| |
| |
| |
Working with Some Examples | |
| |
| |
| |
Anagrams | |
| |
| |
| |
Example: File Analysis | |
| |
| |
| |
Mutable Objects and References | |
| |
| |
| |
Shallow vs. Deep Copy | |
| |
| |
| |
Mutable versus Immutable | |
| |
| |
| |
Tuples | |
| |
| |
| |
Tuples from Lists | |
| |
| |
| |
Why Tuples? | |
| |
| |
| |
Lists: the Data Structure | |
| |
| |
| |
Example Data Structure | |
| |
| |
| |
Other Example Data Structures | |
| |
| |
| |
Algorithm Example | |
| |
| |
| |
Python Diversion: List Comprehension | |
| |
| |
| |
Comprehensions, Expressions and the Ternary Operator | |
| |
| |
| |
Visual Vignette: More Plotting | |
| |
| |
| |
Numpy Arrays | |
| |
| |
| |
Plotting Trigonometric Functions | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
More on Functions | |
| |
| |
| |
Scope: A First Cut | |
| |
| |
| |
Arguments, Parameters, and Namespaces | |
| |
| |
| |
Passing Mutable Objects | |
| |
| |
| |
Returning a Complex Object | |
| |
| |
| |
Refactoring evens | |
| |
| |
| |
Default Values and Parameters | |
| |
| |
| |
Example: Default Values and Parameter Keywords | |
| |
| |
| |
Functions as Objects | |
| |
| |
| |
Function Annotations | |
| |
| |
| |
Docstrings | |
| |
| |
| |
Example: Determining a Final Grade | |
| |
| |
| |
the Data | |
| |
| |
| |
the Design | |
| |
| |
| |
Function: weighted_grade | |
| |
| |
| |
Function: parse_line | |
| |
| |
| |
Function: main | |
| |
| |
| |
Example Use | |
| |
| |
| |
Esoterica: ''by value'' or ''by reference'' | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
Dictionaries and Sets | |
| |
| |
| |
Dictionaries | |
| |
| |
| |
Dictionary Example | |
| |
| |
| |
Python Dictionaries | |
| |
| |
| |
Dictionary Indexing and Assignment | |
| |
| |
| |
Operators | |
| |
| |
| |
Word Count Example | |
| |
| |
| |
Count Words in a String | |
| |
| |
| |
Word Frequency for Gettysburg Address | |
| |
| |
| |
Output and Comments | |
| |
| |
| |
Periodic Table Example | |
| |
| |
| |
Working with CSV Files | |
| |
| |
| |
Algorithm Overview | |
| |
| |
| |
Functions for Divide and Conquer | |
| |
| |
| |
Sets | |
| |
| |
| |
History | |
| |
| |
| |
What's in a Set? | |
| |
| |
| |
Python Sets | |
| |
| |
| |
Methods, Operators, and Functions for Python Sets | |
| |
| |
| |
Set Methods | |
| |
| |
| |
Set Applications | |
| |
| |
| |
Relationship between Words of Different Documents | |
| |
| |
| |
Output and Comments | |
| |
| |
| |
Scope: the Full Story | |
| |
| |
| |
Namespaces and Scope | |
| |
| |
| |
Search Rule for Scope | |
| |
| |
| |
Local | |
| |
| |
| |
Global | |
| |
| |
| |
Built-Ins | |
| |
| |
| |
Enclosed | |
| |
| |
| |
Python Pointer | |
| |
| |
| |
Python Diversion: Dictionary and Set Comprehension | |
| |
| |
| |
Visual Vignette: Bar Graph of Word Frequency | |
| |
| |
| |
Getting the Data Right | |
| |
| |
| |
Labels and the xticks Command | |
| |
| |
| |
Plotting | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
More Program Development | |
| |
| |
| |
Introduction | |
| |
| |
| |
Divide and Conquer | |
| |
| |
| |
Top-Down Refinement | |
| |
| |
| |
the Breast Cancer Classifier | |
| |
| |
| |
the Problem | |
| |
| |
| |
the Approach: Classification | |
| |
| |
| |
Training and Testing the Classifier | |
| |
| |
| |
Building the Classifier | |
| |
| |
| |
Designing the Classifier Algorithm | |
| |
| |
| |
Divided, now Conquer | |
| |
| |
| |
Data Structures | |
| |
| |
| |
File Format | |
| |
| |
| |
the make_training_set Function | |
| |
| |
| |
the make_test_set Function | |
| |
| |
| |
the train_classifier Function | |
| |
| |
| |
train_classifer, Round 2 | |
| |
| |
| |
Testing the Classifier on New Data | |
| |
| |
| |
the report_results Function | |
| |
| |
| |
Running the Classifier on Full Data | |
| |
| |
| |
Training versus Testing | |
| |
| |
| |
Other Interesting Problems | |
| |
| |
| |
Tag Clouds | |
| |
| |
| |
S&P 500 Predictions | |
| |
| |
| |
Predicting Religion with Flags | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
Classes, making your own Data Structures and Algorithms | |
| |
| |
| |
Introduction to Classes | |
| |
| |
| |
Simple Student Class | |
| |
| |
| |
Object-Oriented Programming | |
| |
| |
| |
Python Is Object-Oriented! | |
| |
| |
| |
Characteristics of OOP | |
| |
| |
| |
Working with Object-Oriented Programming | |
| |
| |
| |
Class and Instance | |
| |
| |
| |
Working with Classes and Instances | |
| |
| |
| |
Built-In Class and Instance | |
| |
| |
| |
Our First Class | |
| |
| |
| |
Changing Attributes | |
| |
| |
| |
the Special Relationship Between an Instance and Class: instance-of | |
| |
| |
| |
Object Methods | |
| |
| |
| |
Using Object Methods | |
| |
| |
| |
Writing Methods | |
| |
| |
| |
the Special Argument self | |
| |
| |
| |
Methods are the Interface to a Class Instance | |
| |
| |
| |
Fitting into the Python Class Model | |
| |
| |
| |
Making Programmer-Defined Classes | |
| |
| |
| |
A Student Class | |
| |
| |
| |
Python Standard Methods | |
| |
| |
| |
Now There Are Three: Class Designer, Programmer, and User | |
| |
| |
| |
Example: Point Class | |
| |
| |
| |
Construction | |
| |
| |
| |
Distance | |
| |
| |
| |
Summing Two Points | |
| |
| |
| |
Improving the Point Class | |
| |
| |
| |
Python and OOP | |
| |
| |
| |
Encapsulation | |
| |
| |
| |
Inheritance | |
| |
| |
| |
Polymorphism | |
| |
| |
| |
An Aside: Python and Other OOP languages | |
| |
| |
| |
Public versus Private | |
| |
| |
| |
Indicating Privacy Using Double Underscores (__) | |
| |
| |
| |
Python's Philosophy | |
| |
| |
| |
Modifying an Instance | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
More on Classes | |
| |
| |
| |
More About Class Properties | |
| |
| |
| |
Rational Number (Fraction) Class Example | |
| |
| |
| |
How Does Python Know? | |
| |
| |
| |
Classes, Types, and Introspection | |
| |
| |
| |
Remember Operator Overloading | |
| |
| |
| |
Creating Your Own Operator Overloading | |
| |
| |
| |
Mapping Operators to Special Methods | |
| |
| |
| |
Building the Rational Number Class | |
| |
| |
| |
Making the Class | |
| |
| |
| |
Review Fraction Addition | |
| |
| |
| |
Back to Adding Fractions | |
| |
| |
| |
Equality and Reducing Rationals | |
| |
| |
| |
Divide and Conquer at Work | |
| |
| |
| |
What Doesn't Work (Yet) | |
| |
| |
| |
Introspection | |
| |
| |
| |
Repairing "int + Rational" Errors | |
| |
| |
| |
Inheritance | |
| |
| |
| |
the "Find the Attribute" Game | |
| |
| |
| |
Using Inheritance | |
| |
| |
| |
Example: the Standard Model | |
| |
| |
| |
Program Development with Classes | |
| |
| |
| |
Predator--Prey Problem | |
| |
| |
| |
the Rules | |
| |
| |
| |
Simulation Using Object-Oriented Programming | |
| |
| |
| |
Classes | |
| |
| |
| |
Island Class | |
| |
| |
| |
Predator and Prey, Kinds of Animals | |
| |
| |
| |
Predator and Prey Classes | |
| |
| |
| |
Object Diagram | |
| |
| |
| |
Filling the Island | |
| |
| |
| |
Adding Behavior | |
| |
| |
| |
Refinement: Add Movement | |
| |
| |
| |
Refinement: Time Simulation Loop | |
| |
| |
| |
Refinement: Eating, Breeding, and Keeping Time | |
| |
| |
| |
Improved Time Loop | |
| |
| |
| |
Breeding | |
| |
| |
| |
Eating | |
| |
| |
| |
the Tick of the Clock | |
| |
| |
| |
Refinements | |
| |
| |
| |
Refinement: How Many Times to Move? | |
| |
| |
| |
Refinement: Graphing Population Size | |
| |
| |
| |
Being a better programmer | |
| |
| |
| |
Files and Exceptions II | |
| |
| |
| |
More Details on Files | |
| |
| |
| |
Other File Access Methods, Reading | |
| |
| |
| |
Other File Access Methods, Writing | |
| |
| |
| |
Universal New Line Format | |
| |
| |
| |
Moving Around in a File | |
| |
| |
| |
Closing a File | |
| |
| |
| |
the with Statement | |
| |
| |
| |
CSV Files | |
| |
| |
| |
CSV Module | |
| |
| |
| |
CSV Reader | |
| |
| |
| |
CSV Writer | |
| |
| |
| |
Example: Update Some Grades | |
| |
| |
| |
Module: os | |
| |
| |
| |
Directory (Folder) Structure | |
| |
| |
| |
os Module Functions | |
| |
| |
| |
os Module Example | |
| |
| |
| |
More on Exceptions | |
| |
| |
| |
Basic Exception Handling | |
| |
| |
| |
A Simple Example | |
| |
| |
| |
Events | |
| |
| |
| |
A Philosophy Concerning Exceptions | |
| |
| |
| |
Exception: else and finally | |
| |
| |
| |
finally and with | |
| |
| |
| |
Example: Refactoring the Reprompting of a File Name | |
| |
| |
| |
More on Exceptions | |
| |
| |
| |
Raise | |
| |
| |
| |
Create Your Own | |
| |
| |
| |
Example: Password Manager | |
| |
| |
| |
Programming Projects | |
| |
| |
| |
Testing | |
| |
| |
| |
Why Testing? | |
| |
| |
| |
Kinds of Errors | |
| |
| |
| |
"Bugs" and Debugging | |
| |
| |
| |
Kinds of Testing | |
| |
| |
| |
Testing is Hard! | |
| |
| |
| |
Importance of Testing | |
| |
| |
| |
Example Problem | |
| |
| |
| |
NBA Efficiency | |
| |
| |
| |
Basic Algorithm | |
| |
| |
| |
Incorporating Testing | |
| |
| |
| |
Catching User Errors | |
| |
| |
| |
Catching Developer Errors | |
| |
| |
| |
Automation of Testing | |
| |
| |
| |
doctest | |
| |
| |
| |
Other Kinds of Testing | |
| |
| |
| |
Exercises | |
| |
| |
| |
Recursion: Another Control Mechanism | |
| |
| |
| |
What Is Recursion? | |
| |
| |
| |
Mathematics and Rabbits | |
| |
| |
| |
Let's Write Our Own: Reversing a String | |
| |
| |
| |
How Does Recursion Actually Work? | |
| |
| |
| |
Stack Data Structure | |
| |
| |
| |
Stacks and Function Calls | |
| |
| |
| |
Recursion in Figures | |
| |
| |
| |
Recursive Tree | |
| |
| |
| |
Sierpinski Triangles | |
| |
| |
| |
Recursion to Non-recursion | |
| |
| |
| |
Other Fun Stuff with Python | |
| |
| |
| |
Function Stuff | |
| |
| |
| |
Having a Varying Number of Parameters | |
| |
| |
| |
Iterators and Generators | |
| |
| |
| |
Other Functional Programming Ideas | |
| |
| |
| |
Some Functional Tools: map, reduce, filter | |
| |
| |
| |
Decorators, Functions calling Functions | |
| |
| |
| |
Classes | |
| |
| |
| |
Properties | |
| |
| |
| |
Serializing an Instance, pickle | |
| |
| |
| |
Random Numbers | |
| |
| |
| |
Other Things in Python | |
| |
| |
| |
Data Types | |
| |
| |
| |
Built-in Modules | |
| |
| |
| |
Modules on the Internet | |
| |
| |
| |
the End, or Perhaps the Beginning | |
| |
| |
| |
Getting and Using Python | |
| |
| |
| |
About Python | |
| |
| |
| |
History | |
| |
| |
| |
Python 3 | |
| |
| |
| |
Python is Free and Portable | |
| |
| |
| |
Starting Python Up | |
| |
| |
| |
Working with Python | |
| |
| |
| |
Making a Program | |
| |
| |
| |
Some Conventions for This Book | |
| |
| |
| |
Interactive Code | |
| |
| |
| |
Program: Written Code | |
| |
| |
| |
Combined Program and Output | |
| |
| |
| |
Summary | |
| |
| |
| |
Simple Drawing with Turtle Graphics | |
| |
| |
| |
What is a Turtle? | |
| |
| |
| |
Motion | |
| |
| |
| |
Drawing | |
| |
| |
| |
Color | |
| |
| |
| |
Drawing with Color | |
| |
| |
| |
Other commands | |
| |
| |
| |
Tidbits | |
| |
| |
| |
Keeping the Window Open | |
| |
| |
| |
Working Nicely With IDLE | |
| |
| |
| |
Plotting and Numeric Tools: A Quick Survey | |
| |
| |
| |
Matplotlib | |
| |
| |
| |
Getting matplotlib | |
| |
| |
| |
Working with matplotlib | |
| |
| |
| |
Plot Command | |
| |
| |
| |
Plot Properties | |
| |
| |
| |
Tick Labels | |
| |
| |
| |
Bar Graphs | |
| |
| |
| |
Histograms | |
| |
| |
| |
Pie Charts | |
| |
| |
| |
Numeric Python (Numpy) | |
| |
| |
| |
Arrays Are Not Lists | |
| |
| |
| |
Creating a numpy Array | |
| |
| |
| |
Manipulating Arrays | |
| |
| |
| |
Table of UTF-8 One Byte Encodings | |
| |
| |
| |
Precedence | |
| |
| |
| |
Naming Conventions | |
| |
| |
| |
Python Style Elements | |
| |
| |
| |
Naming Conventions | |
| |
| |
| |
Our Added Naming Conventions | |
| |
| |
| |
Other Python Conventions | |
| |
| |
| |
Check Yourself Solutions | |
| |
| |
| |
Chapter 1 | |
| |
| |
| |
Chapter 2 | |
| |
| |
| |
Chapter 4 | |
| |
| |
| |
Chapter 5 | |
| |
| |
| |
Chapter 6 | |
| |
| |
| |
Chapter 7 | |
| |
| |
| |
Chapter 8 | |
| |
| |
| |
Chapter 9 | |
| |
| |
| |
Chapter 11 | |
| |
| |
| |
Chapter 12 | |
| |
| |
| |
Chapter 14 | |