Practice of Computing Using Python

ISBN-10: 0132992833

ISBN-13: 9780132992831

Edition: 2nd 2013

Authors: William F. Punch, Richard Enbody

List price: $124.00
30 day, 100% satisfaction guarantee

If an item you ordered from TextbookRush does not meet your expectations due to an error on our part, simply fill out a return request and then return it by mail within 30 days of ordering it for a full refund of item cost.

Learn more about our returns policy


A problem-solving approach to programming with Python. The Practice of Computing Using Pythonintroduces CS1 students (majors and non-majors) to computational thinking using Python.  With data-manipulation as a theme, readers quickly see the value in what they’re learning and leave the course with a set of immediately useful computational skills that can be applied to problems they encounter in future pursuits.  The book takes an “object-use-first” approach–writing classes is covered only after students have mastered using objects.   
what's this?
Rush Rewards U
Members Receive:
You have reached 400 XP and carrot coins. That is the daily max!
Study Briefs

Limited time offer: Get the first one free! (?)

All the information you need in one place! Each Study Brief is a summary of one specific subject; facts, figures, and explanations to help you learn faster.

Add to cart
Study Briefs
Periodic Table Online content $4.95 $1.99
Add to cart
Study Briefs
SQL Online content $4.95 $1.99
Add to cart
Study Briefs
MS Excel® 2010 Online content $4.95 $1.99
Add to cart
Study Briefs
MS Word® 2010 Online content $4.95 $1.99
Customers also bought

Book details

List price: $124.00
Edition: 2nd
Copyright year: 2013
Publisher: Addison Wesley
Publication date: 7/12/2012
Binding: Mixed Media
Size: 7.50" wide x 9.00" long x 1.00" tall
Weight: 2.398
Language: English

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
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
Practice, Practice, Practice
QuickStart, the Circumference Program
Examining the code
An Interactive Session
Parts of a Program
Statements and Expressions
Special Python Elements: Tokens
Naming Objects
Recommendations on Naming
Variable Creation and Assignment
Objects and Types
Other Built-In Types
Object types: not variable types
Constructing New Values
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
Programming Projects
the Selection Statement for Decisions: if
Booleans for Decisions
the if Statement
Example: What Lead is Safe in Basketball?
Example: Finding Perfect Numbers
Example: Classifying Numbers
In-Depth Control
True and False: Booleans
Boolean Variables
Relational Operators
Boolean Operators
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
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?
Strategies for Program Design ...
Engage and Commit 116634
Understand, Then Visualize
Think Before You Program
Stop and Think
Relax: Give Yourself a Break
A Simple Example
Build the Skeleton
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
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
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
Indexing and Slicing
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
Example: File Analysis
Mutable Objects and References
Shallow vs. Deep Copy
Mutable versus Immutable
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
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
Dictionary Example
Python Dictionaries
Dictionary Indexing and Assignment
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
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
Python Pointer
Python Diversion: Dictionary and Set Comprehension
Visual Vignette: Bar Graph of Word Frequency
Getting the Data Right
Labels and the xticks Command
Programming Projects
More Program Development
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
Summing Two Points
Improving the Point Class
Python and OOP
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)
Repairing "int + Rational" Errors
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
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
the Tick of the Clock
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
A Philosophy Concerning Exceptions
Exception: else and finally
finally and with
Example: Refactoring the Reprompting of a File Name
More on Exceptions
Create Your Own
Example: Password Manager
Programming Projects
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
Other Kinds of Testing
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
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
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
Simple Drawing with Turtle Graphics
What is a Turtle?
Drawing with Color
Other commands
Keeping the Window Open
Working Nicely With IDLE
Plotting and Numeric Tools: A Quick Survey
Getting matplotlib
Working with matplotlib
Plot Command
Plot Properties
Tick Labels
Bar Graphs
Pie Charts
Numeric Python (Numpy)
Arrays Are Not Lists
Creating a numpy Array
Manipulating Arrays
Table of UTF-8 One Byte Encodings
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
Free shipping on orders over $35*

*A minimum purchase of $35 is required. Shipping is provided via FedEx SmartPost® and FedEx Express Saver®. Average delivery time is 1 – 5 business days, but is not guaranteed in that timeframe. Also allow 1 - 2 days for processing. Free shipping is eligible only in the continental United States and excludes Hawaii, Alaska and Puerto Rico. FedEx service marks used by permission."Marketplace" orders are not eligible for free or discounted shipping.

Learn more about the TextbookRush Marketplace.