(From same book. Only main topics listed here)
Computers and programs
- The universal machine
- Program power
- What is computer science?
- Hardware basics
- Programming languages
- The magic of Python
- Inside a python program
- Chaos and computers
Writing simple programs
- The software development process
- Example program: Temperature converter
- Elements of programs - names, expressions
- Output statements
- Assignment statements - Simple assignment, assigning input, simultaneous assignment
- Definite loops
- Example program - future value
Computing with numbers
- Numeric data types
- Type conversions and rounding
- Using the Math library
- Accumulating results - factorials
- Limitations of computer arithmetic
Objects and graphics
- The object of Objects
- Simple graphics programming
- Using graphical objects
- Graphing future value
- Choosing coordinates
- Interactive graphics - getting mouse clicks, handling textual input
- Graphics module reference - GraphWin Objects, Graphics Objects, Entry Objects, Displaying Images, Generating Colors, Controlling Display Updates (advanced)
Sequences: Strings, lists and files
- The string data type
- Simple string processing
- Lists as sequences
- String representation and message encoding - programming an encoder
- String methods - programming a decoder
- Lists have methods too
- Encoding to encryption
- Input / Output as string manipulation - example application: date conversion, string formatting, better change counter
- File processing - multi-line strings, file processing, example program: batch usernames, file dialogs
Defining functions
- The function of functions
- Functions, informally
- Future value with a function
- Functions and parameters: The exciting details
- Functions that return values
- Functions that modify parameters
- Functions and program structure
Decision structures
- Simple decisions
- Two-way decisions
- Multi-way decisions
- Exception handling
- Study in design: max of three. Compare each to all, decision tree, sequential processing, use of python
Loop structures and Booleans
- For loops
- Indefinite loops
- Common loop patterns - interactive, sentinel, file, nested
- Computing with Booleans - Boolean operators, Boolean algebra
- Other common structures - post-test loop, loop and a half, Boolean expressions as decisions
- Example - a simple event loop
Simulation and design
- Simulating racquetball - A simulation problem, analysis and specification,
- Pseudo-random numbers
- Top-down design - Top-level design, separation of concerns, second-level design, designing simNGames, third-level design, finishing up, summary of design process
- Bottom-up implentation - unit testing, simulation results
- Other design techniques - prototyping and spiral development, the art of design
Defining classes
- Quick review of Objects
- Example program: Cannonball, program specification, designing the program, modularizing the program
- Defining new classes: multi-sided dice, projectile class
- Data processing with class
- Objects and encapsulation: Encapsulating useful abstractions, putting classes in modules, module documentation, working with multiple modules
- Widgets: Example program: Dice roller, building buttons, building dice, the main program
- Animated Cannonball: Drawing the animated window, creating a shot tracker, creating an input dialog, the main event loop
Data collections
- Example problem: simple statistics
- Applying lists: Lists and arrays, list operations, statistics with lists
- Lists of records
- Designing with lists and classes
- Case study: Python calculator: Calculator as an object, constructing the interface, processing buttons
- Case study: Better cannonball animation: Creating a launcher, tracking multiple shots
- Non-sequential collections: Dictionary basics, dictionary operations, example program: Word frequency
Object-Oriented Design
- The process of OOD
- Case study: Racquetball simulation: Candidate objects and methods, implementing SimStats, implementing RBallGame, implementing Player, the complete program
- Case study: Dice poker: Program specification, identifying candidate objects, implementing the model, a text-based UI, developing a GUI
- OO concepts: encapsulation, polymorphism, inheritance
Algorithm design and recursion
- Searching: Simple searching program, linear seach, binary search, comparing algorithms
- Recursive problem solving: Definitions, functions, string reversal, anagrams, fast exponentiation, binary search, recursion vs. iteration
- Sorting algorithms: Naive sorting: selection sort, divide and conquer - merge sort, comparing sorts
- Hard problems: Tower of Hanoi, the halting problem
No comments:
Post a Comment