Introduction to Computer Science Using Python: A Computational Problem-Solving Focus,recommended by Guido van Rossum, the creator of Python (βThis is not your average Python bookβ¦I think this book is a great text for anyone teaching CS1β). With a focus on computational problem solving from Chapter 1
Introduction to Computer Science Using Python: A Computational Problem-Solving Focus
β Scribed by Charles Dierbach
- Publisher
- Wiley
- Year
- 2013
- Tongue
- English
- Leaves
- 610
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Introduction to Computer Science Using Python: A Computational Problem-Solving Focusintroduces students to programming and computational problem-solving via a back-to-basics, step-by-step, objects-late approach that makes this book easy to teach and learn from. Students are provided with a thorough conceptual grounding in computational problem solving before introducing them to specific Python syntax, thus giving them the background to become successful programmers in any language. Dierbach offers students a thorough grounding in imperative programming before introducing them to object-oriented programming. His step-by-step pedagogical approach makes this an accessible and student-friendly introduction to programming that eases students into program-writing through a variety of hands-on exercises.
β¦ Table of Contents
Cover
Title Page
Copyright Page
Dedication
Brief Contents
Contents
Preface
Acknowledgments
About the Author
1 Introduction
MOTIVATION
FUNDAMENTALS
1.1 What Is Computer Science?
1.1.1 The Essence of Computational Problem Solving
1.1.2 Limits of Computational Problem Solving
Self-Test Questions
1.2 Computer Algorithms
1.2.1 What Is an Algorithm?
1.2.2 Algorithms and Computers: A Perfect Match
Self-Test Questions
1.3 Computer Hardware
1.3.1 Digital Computing: It's All about Switches
1.3.2 The Binary Number System
1.3.3 Fundamental Hardware Components
1.3.4 Operating Systems-Bridging Software and Hardware
1.3.5 Limits of Integrated Circuits Technology: Moore's Law
Self-Test Questions
1.4 Computer Software
1.4.1 What Is Computer Software?
1.4.2 Syntax, Semantics, and Program Translation
1.4.3 Procedural vs. Object-Oriented Programming
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
1.5 The Process of Computational Problem Solving
1.5.1 Problem Analysis
1.5.2 Program Design
1.5.3 Program Implementation
1.5.4 Program Testing
1.6 The Python Programming Language
1.6.1 About Python
1.6.2 The IDLE Python Development Environment
1.6.3 The Python Standard Library
1.6.4 A Bit of Python
1.6.5 Learning How to Use IDLE
1.7 A First Program-Calculating the Drake Equation
1.7.1 The Problem
1.7.2 Problem Analysis
1.7.3 Program Design
1.7.4 Program Implementation
1.7.5 Program Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
2 Data and Expressions
MOTIVATION
FUNDAMENTAL CONCEPTS
2.1 Literals
2.1.1 What Is a Literal?
2.1.2 Numeric Literals
2.1.3 String Literals
2.1.4 Control Characters
2.1.5 String Formatting
2.1.6 Implicit and Explicit Line Joining
2.1.7 Let's Apply It-"Hello World Unicode Encoding"
Self-Test Questions
2.2 Variables and Identifiers
2.2.1 What Is a Variable?
2.2.2 Variable Assignment and Keyboard Input
2.2.3 What Is an Identifier?
2.2.4 Keywords and Other Predefined Identifiers in Python
2.2.5 Let's Apply It-"Restaurant Tab Calculation"
Self-Test Questions
2.3 Operators
2.3.1 What Is an Operator?
2.3.2 Arithmetic Operators
2.3.3 Let's Apply It-"Your Place in the Universe"
Self-Test Questions
2.4 Expressions and Data Types
2.4.1 What Is an Expression?
2.4.2 Operator Precedence
2.4.3 Operator Associativity
2.4.4 What Is a Data Type?
2.4.5 Mixed-Type Expressions
2.4.6 Let's Apply It-"Temperature Conversion Program"
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
2.5 Age in Seconds Program
2.5.1 The Problem
2.5.2 Problem Analysis
2.5.3 Program Design
2.5.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
3 Control Structures
MOTIVATION
FUNDAMENTAL CONCEPTS
3.1 What Is a Control Structure?
3.2 Boolean Expressions (Conditions)
3.2.1 Relational Operators
3.2.2 Membership Operators
3.2.3 Boolean Operators
3.2.4 Operator Precedence and Boolean Expressions
3.2.5 Short-Circuit (Lazy) Evaluation
3.2.6 Logically Equivalent Boolean Expressions
Self-Test Questions
3.3 Selection Control
3.3.1 If Statement
3.3.2 Indentation in Python
3.3.3 Multi-Way Selection
3.3.4 Let's Apply It-Number of Days in Month Program
Self-Test Questions
3.4 Iterative Control
3.4.1 While Statement
3.4.2 Input Error Checking
3.4.3 Infinite loops
3.4.4 Definite vs. Indefinite Loops
3.4.5 Boolean Flags and Indefinite Loops
3.4.6 Let's Apply It-Coin Change Exercise Program
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
3.5 Calendar Month Program
3.5.1 The Problem
3.5.2 Problem Analysis
3.5.3 Program Design
3.5.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
4 Lists
MOTIVATION
FUNDAMENTAL CONCEPTS
4.1 List Structures
4.1.1 What Is a List?
4.1.2 Common List Operations
4.1.3 List Traversal
Self-Test Questions
4.2 Lists (Sequences) in Python
4.2.1 Python List Type
4.2.2 Tuples
4.2.3 Sequences
4.2.4 Nested Lists
4.2.5 Let's Apply It-A Chinese Zodiac Program
Self-Test Questions
4.3 Iterating Over Lists (Sequences) in Python
4.3.1 For Loops
4.3.2 The Built-in range Function
4.3.3 Iterating Over List Elements vs. List Index Values
4.3.4 While Loops and Lists (Sequences)
4.3.5 Let's Apply It-Password Encryption/Decryption Program
Self-Test Questions
4.4 More on Python Lists
4.4.1 Assigning and Copying Lists
4.4.2 List Comprehensions
COMPUTATIONAL PROBLEM SOLVING
4.5 Calendar Year Program
4.5.1 The Problem
4.5.2 Problem Analysis
4.5.3 Program Design
4.5.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
5 Functions
MOTIVATION
FUNDAMENTAL CONCEPTS
5.1 Program Routines
5.1.1 What Is a Function Routine?
5.1.2 Defining Functions
5.1.3 Let's Apply It-Temperature Conversion Program (Function Version)
Self-Test Questions
5.2 More on Functions
5.2.1 Calling Value-Returning Functions
5.2.2 Calling Non-Value-Returning Functions
5.2.3 Parameter Passing
5.2.4 Keyword Arguments in Python
5.2.5 Default Arguments in Python
5.2.6 Variable Scope
5.2.7 Let's Apply It-GPA Calculation Program
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
5.3 Credit Card Calculation Program
5.3.1 The Problem
5.3.2 Problem Analysis
5.3.3 Program Design
5.3.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
6 Objects and Their Use
MOTIVATION
FUNDAMENTAL CONCEPTS
6.1 Software Objects
6.1.1 What Is an Object?
6.1.2 Object References
Self-Test Questions
6.2 Turtle Graphics
6.2.1 Creating a Turtle Graphics Window
6.2.2 The "Default" Turtle
6.2.3 Fundamental Turtle Attributes and Behavior
6.2.4 Additional Turtle Attributes
6.2.5 Creating Multiple Turtles
6.2.6 Let's Apply It-Bouncing Balls Program
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
6.3 Horse Race Simulation Program
6.3.1 The Problem
6.3.2 Problem Analysis
6.3.3 Program Design
6.3.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
7 Modular Design
MOTIVATION
FUNDAMENTAL CONCEPTS
7.1 Modules
7.1.1 What Is a Module?
7.1.2 Module Specification
Self-Test Questions
7.2 Top-Down Design
7.2.1 Developing a Modular Design of the Calendar Year Program
7.2.2 Specification of the Calendar Year Program Modules
Self-Test Questions
7.3 Python Modules
7.3.1 What Is a Python Module?
7.3.2 Modules and Namespaces
7.3.3 Importing Modules
7.3.4 Module Loading and Execution
7.3.5 Local, Global, and Built-in Namespaces in Python
7.3.6 A Programmer-Defined Stack Module
7.3.7 Let's Apply It-A Palindrome Checker Program
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
7.4 Calendar Year Program (function version)
7.4.1 The Problem
7.4.2 Problem Analysis
7.4.3 Program Design
7.4.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
8 Text Files
MOTIVATION
FUNDAMENTAL CONCEPTS
8.1 What Is a Text File?
8.2 Using Text Files
8.2.1 Opening Text Files
8.2.2 Reading Text Files
8.2.3 Writing Text Files
Self-Test Questions
8.3 String Processing
8.3.1 String Traversal
8.3.2 String-Applicable Sequence Operations
8.3.3 String Methods
8.3.4 Let's Apply It-Sparse Text Program
Self-Test Questions
8.4 Exception Handling
8.4.1 What Is an Exception?
8.4.2 The Propagation of Raised Exceptions
8.4.3 Catching and Handling Exceptions
8.4.4 Exception Handling and User Input
8.4.5 Exception Handling and File Processing
8.4.6 Let's Apply It-Word Frequency Count Program
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
8.5 Cigarette Use/Lung Cancer Correlation Program
8.5.1 The Problem
8.5.2 Problem Analysis
8.5.3 Program Design
8.5.4 Program Implementation and Testing
8.5.5 Determining the Correlation Between Smoking and Lung Cancer
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
9 Dictionaries and Sets
MOTIVATION
FUNDAMENTAL CONCEPTS
9.1 Dictionary Type in Python
9.1.1 What Is a Dictionary?
9.1.2 Let's Apply It-Phone Number Spelling Program
Self-Test Questions
9.2 Set Data Type
9.2.1 The Set Data Type in Python
9.2.2 Let's Apply It-Kitchen Tile Visualization Program
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
9.3 A Food Co-op's Worker Scheduling Simulation
9.3.1 The Problem
9.3.2 Problem Analysis
9.3.3 Program Design
9.3.4 Program Implementation and Testing
9.3.5 Analyzing a Scheduled vs. Unscheduled Co-op Worker Approach
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
10 Object-Oriented Programming
MOTIVATION
FUNDAMENTAL CONCEPTS
10.1 What Is Object-Oriented Programming?
10.1.1 What Is a Class?
10.1.2 Three Fundamental Features of Object-Oriented Programming
10.2 Encapsulation
10.2.1 What Is Encapsulation?
10.2.2 Defining Classes in Python
10.2.3 Let's Apply It-A Recipe Conversion Program
Self-Test Questions
10.3 Inheritance
10.3.1 What Is Inheritance?
10.3.2 Subtypes
10.3.3 Defining Subclasses in Python
10.3.4 Let's Apply It-A Mixed Fraction Class
Self-Test Questions
10.4 Polymorphism
10.4.1 What Is Polymorphism?
10.4.2 The Use of Polymorphism
Self-Test Questions
10.5 Object-Oriented Design Using UML
10.5.1 What Is UML?
10.5.2 UML Class Diagrams
Self-Test Questions
COMPUTATIONAL PROBLEM SOLVING
10.6 Vehicle Rental Agency Program
10.6.1 The Problem
10.6.2 Problem Analysis
10.6.3 Program Design
10.6.4 Program Implementation and Testing
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
11 Recursion
MOTIVATION
FUNDAMENTAL CONCEPTS
11.1 Recursive Functions
11.1.1 What Is a Recursive Function?
11.1.2 The Factorial Function
11.1.3 Let's Apply It-Fractals (Sierpinski Triangle)
Self-Test Questions
11.2 Recursive Problem Solving
11.2.1 Thinking Recursively
11.2.2 MergeSort Recursive Algorithm
11.2.3 Let's Apply It-MergeSort Implementation
Self-Test Questions
11.3 Iteration vs. Recursion
COMPUTATIONAL PROBLEM SOLVING
11.4 Towers of Hanoi
11.4.1 The Problem
11.4.2 Problem Analysis
11.4.3 Program Design and Implementation
Chapter Summary
Chapter Exercises
Python Programming Exercises
Program Modification Problems
Program Development Problems
12 Computing and Its Developments
CONTRIBUTIONS TO THE MODERN COMPUTER
12.1 The Concept of a Programmable Computer
12.1.1 "Father of the Modern Computer"-Charles Babbage (1800s)
12.1.2 "The First Computer Programmer"-Ada Lovelace (1800s)
12.2 Developments Leading to Electronic Computing
12.2.1 The Development of Boolean Algebra (mid-1800s)
12.2.2 The Development of the Vacuum Tube (1883)
12.2.3 The Development of Digital Electronic Logic Gates (1903)
12.2.4 The Development of Memory Electronic Circuits (1919)
12.2.5 The Development of Electronic Digital Logic Circuits (1937)
12.2.6 "The Father of Information Theory"-Claude Shannon (1948)
FIRST-GENERATION COMPUTERS (1940s-mid-1950s)
12.3 The Early Groundbreakers
12.3.1 The Z3-The First Programmable Computer (1941)
12.3.2 The Mark I-First Computer Project in the United States (1937-1943)
12.3.3 The ABC-The First Fully Electronic Computing Device (1942)
12.3.4 Colossus-A Special-Purpose Electronic Computer (1943)
12.3.5 ENIAC-The First Fully Electronic Programmable Computer
12.3.6 EDVAC/ACE-The First Stored Program Computers (1950)
12.3.7 Whirlwind-The First Real-Time Computer (1951)
12.4 The First Commercially Available Computers
12.4.1 The Struggles of the Eckert-Mauchly Computer Corporation (1950)
12.4.2 The LEO Computer of the J. Lyons and Company (1951)
SECOND-GENERATION COMPUTERS (mid-1950s to mid-1960s)
12.5 Transistorized Computers
12.5.1 The Development of the Transistor (1947)
12.5.2 The First Transistor Computer (1953)
12.6 The Development of High-Level Programming Languages
12.6.1 The Development of Assembly Language (early 1950s)
12.6.2 The First High-Level Programming Languages (mid-1950s)
12.6.3 The First "Program Bug" (1947)
THIRD-GENERATION COMPUTERS (mid-1960s to early 1970s)
12.7 The Development of the Integrated Circuit (1958)
12.7.1 The Catalyst for Integrated Circuit Advancements (1960s)
12.7.2 The Development of the Microprocessor (1971)
12.8 Mainframes, Minicomputers, and Supercomputers
12.8.1 The Establishment of the Mainframe Computer (1962)
12.8.2 The Development of the Minicomputer (1963)
12.8.3 The Development of the UNIX Operating System (1969)
12.8.4 The Development of Graphical User Interfaces (early 1960s)
12.8.5 The Development of the Supercomputer (1972)
FOURTH-GENERATION COMPUTERS (early 1970s to the Present)
12.9 The Rise of the Microprocessor
12.9.1 The First Commercially Available Microprocessor (1971)
12.9.2 The First Commercially Available Microcomputer Kit (1975)
12.10 The Dawn of Personal Computing
12.10.1 The Beginnings of Microsoft (1975)
12.10.2 The Apple II (1977)
12.10.3 IBM's Entry into the Microcomputer Market (1981)
12.10.4 Society Embraces the Personal Computer (1983)
12.10.5 The Development of Graphical User Interfaces (GUIs)
12.10.6 The Development of the C++ Programming Language
THE DEVELOPMENT OF COMPUTER NETWORKS
12.11 The Development of Wide Area Networks
12.11.1 The Idea of Packet-Switched Networks (early 1960s)
12.11.2 The First Packet-Switched Network: ARPANET (1969)
12.12 The Development of Local Area Networks (LANs)
12.12.1 The Need for Local Area Networks
12.12.2 The Development of Ethernet (1980)
12.13 The Development of the Internet and World Wide Web
12.13.1 The Realization of the Need for "Internetworking"
12.13.2 The Development of the TCP/IP Internetworking Protocol (1973)
12.13.3 The Development of the World Wide Web (1990)
12.13.4 The Development of the Java Programming Language (1995)
Appendix
Index
π SIMILAR VOLUMES
<p><b><i>Introduction to Computer Science Using Python: A Computational Problem-Solving Focus</i></b><i>,recommended by Guido van Rossum, the creator of Python</i> (βThis is not your average Python bookβ¦I think this book is a great text for anyone teaching CS1β). With a focus on computational proble
Introduction to Computer Science Using Python: A Computational Problem-Solving Focusintroduces students to programming and computational problem-solving via a back-to-basics, step-by-step, objects-late approach that makes this book easy to teach and learn from. Students are provided with a thorough
Removed Pre Flight signature