Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
2Activity

Table Of Contents

Computers and Programs
1.1 The Universal Machine
1.2 Program Power
1.3 What is Computer Science?
1.4 Hardware Basics
1.5 Programming Languages
1.6 The Magic of Python
1.7 Inside a Python Program
1.8 Chaos and Computers
1.9 Exercises
Writing Simple Programs
2.1 The Software Development Process
2.2 Example Program: Temperature Converter
2.3 Elements of Programs
2.3.1 Names
2.3.2 Expressions
2.4 Output Statements
2.5 Assignment Statements
2.5.1 Simple Assignment
2.5.2 Assigning Input
2.5.3 Simultaneous Assignment
2.6 Definite Loops
2.7 Example Program: Future Value
2.8 Exercises
Computing with Numbers
3.1 Numeric Data Types
3.2 Using the Math Library
3.3 Accumulating Results: Factorial
3.4 The Limits of Int
3.5 Handling Large Numbers: Long Ints
3.6 Type Conversions
3.7 Exercises
Computing with Strings
4.1 The String Data Type
4.2 Simple String Processing
4.3 Strings and Secret Codes
4.3.1 String Representation
4.3.2 Programming an Encoder
4.3.3 Programming a Decoder
4.3.4 Other String Operations
4.3.5 From Encoding to Encryption
4.4 Output as String Manipulation
4.4.1 Converting Numbers to Strings
4.4.2 String Formatting
4.4.3 Better Change Counter
4.5 File Processing
4.5.1 Multi-Line Strings
4.5.2 File Processing
4.5.3 Example Program: Batch Usernames
4.5.4 Coming Attraction: Objects
4.6 Exercises
Objects and Graphics
5.1 The Object of Objects
5.2 Graphics Programming
5.3 Using Graphical Objects
5.4 Graphing Future Value
5.5 Choosing Coordinates
5.6 Interactive Graphics
5.6.1 Getting Mouse Clicks
5.6.2 Handling Textual Input
5.7. GRAPHICS MODULEREFERENCE 79
5.7 Graphics Module Reference
5.7.1 GraphWin Objects
5.7.2 Graphics Objects
5.7.3 Entry Objects
5.7.4 Displaying Images
5.7.5 Generating Colors
5.8 Exercises
Defining Functions
6.1 The Function of Functions
6.2 Functions, Informally
6.3 Future Value with a Function
6.4 Functions and Parameters: The Gory Details
6.5 Functions that Return Values
6.6. FUNCTIONS ANDPROGRAM STRUCTURE 95
6.6 Functions and Program Structure
6.7 Exercises
Control Structures, Part 1
7.1 Simple Decisions
7.1.1 Example: Temperature Warnings
7.1.2 Forming Simple Conditions
7.1.3 Example: Conditional Program Execution
7.2 Two-Way Decisions
7.3 Multi-Way Decisions
7.4 Exception Handling
7.5 Study in Design: Max of Three
7.5.1 Strategy 1: Compare Each to All
7.5.2 Strategy 2: Decision Tree
7.5.3 Strategy 3: Sequential Processing
7.5.4 Strategy 4: Use Python
7.5.5 Some Lessons
7.6 Exercises
Control Structures, Part 2
8.1 For Loops: A Quick Review
8.2 Indefinite Loops
8.3 Common Loop Patterns
8.3.1 Interactive Loops
8.3.2 Sentinel Loops
8.3.3 File Loops
8.3.4 Nested Loops
8.4 Computing with Booleans
8.4.1 Boolean Operators
8.4.2 Boolean Algebra
Algebra Boolean algebra
8.5 Other Common Structures
8.5.1 Post-Test Loop
8.5.2 Loop and a Half
8.5.3 Boolean Expressions as Decisions
8.6 Exercises
Simulation and Design
9.1 Simulating Racquetball
9.1.1 A Simulation Problem
9.1.2 Program Specification
9.2 Random Numbers
9.3 Top-Down Design
9.3.1 Top-Level Design
9.3.2 Separation of Concerns
9.3.4 Designing simNGames
9.3.5 Third-Level Design
9.3.6 Finishing Up
9.3.7 Summary of the Design Process
9.4 Bottom-Up Implementation
9.4.1 Unit Testing
9.4.2 Simulation Results
9.5 Other Design Techniques
9.5.1 Prototyping and Spiral Development
9.5.2 The Art of Design
9.6 Exercises
Defining Classes
10.1 Quick Review of Objects
10.2 Example Program: Cannonball
10.2.1 Program Specification
10.2.2 Designing the Program
10.2.3 Modularizing the Program
10.3 Defining New Classes
10.3.1 Example: Multi-Sided Dice
10.3.2 Example: The Projectile Class
10.4 Objects and Encapsulation
10.4.1 Encapsulating Useful Abstractions
10.4.2 Putting Classes in Modules
10.5 Widget Objects
10.5.1 Example Program: Dice Roller
10.5.2 Building Buttons
10.5.3 Building Dice
10.5.4 The Main Program
10.6 Exercises
Data Collections
11.1 Example Problem: Simple Statistics
11.2 Applying Lists
11.2.1 Lists are Sequences
11.2.2 Lists vs. Strings
11.2.3 List Operations
11.3 Statistics with Lists
11.4 Combining Lists and Classes
11.5 Case Study: Python Calculator
11.5.1 A Calculator as an Object
11.5.2 Constructing the Interface
11.5.3 Processing Buttons
11.6 Non-Sequential Collections
11.6.1 Dictionary Basics
11.6.2 Dictionary Operations
11.6.3 Example Program: Word Frequency
11.7 Exercises
Object-Oriented Design
12.1 The Process of OOD
12.2 Case Study: Racquetball Simulation
12.2.1 Candidate Objects and Methods
12.2.2 Implementing SimStats
12.2.3 Implementing RBallGame
12.2.4 Implementing Player
12.2.5 The Complete Program
12.3 Case Study: Dice Poker
12.3.1 Program Specification
12.3.2 Identifying Candidate Objects
12.3.3 Implementing the Model
12.3.4 A Text-Based UI
12.3.5 Developing a GUI
12.4 OO Concepts
12.4.1 Encapsulation
12.4.2 Polymorphism
12.4.3 Inheritance
12.5 Exercises
Algorithm Analysis and Design
13.1 Searching
13.1.1 A Simple Searching Problem
13.1.2 Strategy 1: Linear Search
13.1.3 Strategy 2: Binary Search
13.1.4 Comparing Algorithms
13.2 Recursive Problem-Solving
13.2.1 Recursive Definitions
13.2.2 Recursive Functions
13.2.3 Recursive Search
13.3 Sorting Algorithms
13.3.1 Naive Sorting: Selection Sort
13.3.2 Divide and Conquer: Merge Sort
0 of .
Results for:
No results containing your search query
P. 1
Python Programming - John Zelle

Python Programming - John Zelle

Ratings: (0)|Views: 38 |Likes:
Published by Edward Grace

More info:

Published by: Edward Grace on Feb 20, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/07/2012

pdf

text

original

You're Reading a Free Preview
Pages 4 to 149 are not shown in this preview.
You're Reading a Free Preview
Pages 152 to 261 are not shown in this preview.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->