Required Textbook for CS8 Spring 2018, Conrad
cover | title | author | edition | copyright | isbn | publisher |
---|---|---|---|---|---|---|
Introduction to Computing Using Python, 2nd Edition (Perkovic) | Ljubomir Perkovic | 2nd | 2015 | 9781118890943 | Wiley |
Table of Contents
Chapter 1. Introduction to Computer Science
- 1.1 Computer Science
- What Do Computing Professionals Do?
- Models, Algorithms, and Programs
- Tools of the Trade
- What Is Computer Science?
- 1.2 Computer Systems
- Computer Hardware
- Operating Systems
- Networks and Network Protocols
- Programming Languages
- Software Libraries
- 1.3 Python Programming Language
- Short History of Python
- Setting Up the Python Development Environment
- 1.4 Computational Thinking
- A Sample Problem
- Abstraction and Modeling
- Algorithm
- Data Types
- Assignments and Execution
- Control Structures
- Chapter Summary
Chapter 2. Python Data Types
- 2.1 Expressions, Variables, and Assignments
- Algebraic Expressions and Functions
- Boolean Expressions and Operators
- Variables and Assignments
- Variable Names
- 2.2 Strings
- String Operators
- Indexing Operator
- 2.3 Lists and Tuples
- List Operators
- Lists Are Mutable, Strings Are Not
- Tuples, or “ImmutableLists”
- List and Tuple Methods
- 2.4 Objects and Classes
- Object Type
- Valid Values for Number Types
- Operators for Number Type
- Creating Objects
- Implicit Type Conversions
- Explicit Type Conversions
- Class Methods and Object-Oriented Programming
- 2.5 PythonStandardLibrary
- Module math
- Module fractions
- CaseStudy: Turtle Graphics
- Chapter Summary
- Solutions to Practice Problems
- Exercises
Chapter 3. Imperative Programming
- download code as zip file
- 3.1 Python Programs
- Our First Python Program
- Python Modules
- Built-In Function print()
- Interactive Input with input()
- Function eval()
- 3.2 ExecutionControlStructures
- One-Way Decisions
- Two-Way Decisions
- Iteration Structures
- Nesting Control Flow Structures
- Function range()
- 3.3 User-DefinedFunction
- Our First Function
- Function Input Arguments
- print() versus return
- Function Definitions Are “Assignment” Statements
- Comments
- Docstrings
- 3.4 Python Variables and Assignments
- Mutable and Immutable Types
- Assignments and Mutability
- Swapping
- 3.5 Parameter Passing
- Immutable Parameter Passing
- Mutable Parameter Passing
-
CaseStudy:Automating Turtle Graphics
- Chapter Summary
- Solutions to Practice Problems
- Exercises
- Problems
Chapter 4. Text data, Files, and Exceptions
- download code as zip file
- 4.1 Strings, Revisited
- String Representations
- The Indexing Operator, Revisited
- String Methods
- 4.2 Formatted Output
- Function print()
- String Method format()
- Lining Up Data in Columns
- Getting and Formatting the Date and Time
- 4.3 Files
- File System
- Opening and Closing a File
- Patterns for Reading a Text File
- Writing to a Text File
- 4.4 Errors and Exceptions
- SyntaxErrors
- Built-InExceptions
-
CaseStudy:Image Files
- Chapter Summary
- Solutions to Practice Problems
- Exercises
- Problems
Chapter 5. Execution Control Structures
- download code as zip file
- 5.1 Decision Control and the if Statement
- Three-Way (and More!) Decisions
- Ordering of Conditions
- 5.2 for Loop and Iteration Patterns
- Loop Pattern: Iteration Loop
- Loop Pattern: Counter Loop
- Loop Pattern: Accumulator Loop
- Accumulating Different Types
- Loop Patterns:NestedLoop
- 5.3 MoreonLists:Two-DimensionalLists
- Two-Dimensional Lists
- Two-Dimensional Lists and the Nested Loop Pattern
- 5.4 whileLoop
- while Loop Usage
- 5.5 More Loop Patterns
- Iteration Patterns: Sequence Loop
- Loop Pattern: Infinite Loop
- Loop Pattern: Loop and a Half
- 5.6 Additional Iteration Control Statements
- break Statement
- continue Statement
- pass Statement
-
Case Study: Image Processing.
- Chapter Summary
- Solutions to Practice Problems
- Exercises
- Problems
Chapter 6. Containers and Randomness
- download code as zip file
- 6.1 Dictionaries
- User-Defined Indexes as Motivation for Dictionaries
- Dictionary Class Properties
- Dictionary Operators
- Dictionary Methods
- A Dictionary as a Substitute for the Multiway if Statement
- Dictionary as a Collection of Counters
- tuple Objects Can Be Dictionary Keys
- 6.2 Sets
- Using the set Constructor to Remove Duplicates
- set Operators
- set Methods
- 6.3 Character Encodings and Strings
- Character Encodings
- ASCII
- Unicode
- UTF-8 Encoding for Unicode Characters
- 6.4 Module random
- Choosing a Random Integer
- Choosing a Random “Real”
- Shuffling, Choosing, and Sampling at Random
-
Case Study: Games of Chance
- Chapter Summary
- Solutions to Practice Problems
- Exercises
- Problems