Learn to Program with Python
Publisher: Apress
Published: Aug 22, 2016
Number of pages: 263
ISBN-13: 9781484218686
Table of contents: title: About the Author
pagenum: xvii; title: About the Technical Reviewer
pagenum: xix; title: Acknowledgments
pagenum: xxi; label: Chapter 1
title: Getting Started
pagenum: 1; title: Welcome
pagenum: 1; title: What Is Python?
pagenum: 1; title: Installing Python
pagenum: 2; title: IDLE and the Python Shell
pagenum: 2; title: Hello World
pagenum: 3; title: Creating, Saving, and Running a Python File
pagenum: 4; title: IDLE on Multiple Platforms
pagenum: 6; title: Summary
pagenum: 6; label: Chapter 2
title: Variables and Assignment Statements
pagenum: 7; title: A Sample Python Program
pagenum: 8; title: The Building Blocks of Programming
pagenum: 9; title: Four Types of Data
pagenum: 10; title: Integers
pagenum: 10; title: Floats
pagenum: 10; title: Strings
pagenum: 10; title: Booleans
pagenum: 11; title: Examples of Data
pagenum: 11; title: Form with Underlying Data
pagenum: 12; title: Variables
pagenum: 13; title: Assignment Statements
pagenum: 16; title: Variable Names
pagenum: 18; title: Naming Convention
pagenum: 19; title: Keywords
pagenum: 20; title: Case Sensitivity
pagenum: 21; title: More Complicated Assignment Statements
pagenum: 21; title: Print Statements
pagenum: 22; title: Simple Math
pagenum: 24; title: Order of Operations
pagenum: 26; title: First Python Programs
pagenum: 27; title: Shorthand Naming Convention
pagenum: 28; title: Adding Comments
pagenum: 30; title: Full-Line Comment
pagenum: 30; title: Add a Comment After a Line of Code
pagenum: 30; title: Multiline Comment
pagenum: 30; title: Whitespace
pagenum: 31; title: Errors
pagenum: 32; title: Syntax Error
pagenum: 32; title: Exception Error
pagenum: 33; title: Logic Error
pagenum: 34; title: Summary
pagenum: 34; label: Chapter 3
title: Built-in Functions
pagenum: 35; title: Overview of Built-in Functions
pagenum: 35; title: Function Call
pagenum: 36; title: Arguments
pagenum: 36; title: Results
pagenum: 36; title: Built-in type Function
pagenum: 36; title: Getting Input from the User
pagenum: 38; title: Conversion Functions
pagenum: 39; title: int Function
pagenum: 39; title: float Function
pagenum: 39; title: str Function
pagenum: 39; title: First Real Programs
pagenum: 40; title: Concatenation
pagenum: 42; title: Another Programming Exercise
pagenum: 43; title: Using Function Calls Inside Assignment Statements
pagenum: 45; title: Summary
pagenum: 46; label: Chapter 4
title: User-Defined Functions
pagenum: 47; title: A Recipe as an Analogy for Building Software
pagenum: 48; title: Ingredients
pagenum: 48; title: Directions
pagenum: 48; title: Definition of a Function
pagenum: 50; title: Building Our First Function
pagenum: 51; title: Calling a User-Defined Function
pagenum: 51; title: Receiving Data in a User-Defined Function: Parameters
pagenum: 53; title: Building User-Defined Functions with Parameters
pagenum: 54; title: Building a Simple Function that Does Addition
pagenum: 56; title: Building a Function to Calculate an Average
pagenum: 57; title: Returning a Value from a Function: The return Statement
pagenum: 57; title: Returning No Value: None
pagenum: 59; title: Returning More Than One Value
pagenum: 59; title: Specific and General Variable Names in Calls and Functions
pagenum: 60; title: Temperature Conversion Functions
pagenum: 61; title: Placement of Functions in a Python File
pagenum: 62; title: Never Write Multiple Copies of the Same Code
pagenum: 62; title: Constants
pagenum: 64; title: Scope
pagenum: 64; title: Global Variables and Local Variables with the Same Names
pagenum: 67; title: Finding Errors in Functions: Traceback
pagenum: 68; title: Summary
pagenum: 70; label: Chapter 5
title: if, else, and elif Statements
pagenum: 71; title: Flowcharting
pagenum: 72; title: The if Statement
pagenum: 74; title: Comparison Operators
pagenum: 76; title: Examples of if Statements
pagenum: 76; title: Nested if Statement
pagenum: 77; title: The else Statement
pagenum: 78; title: Using if/else Inside a Function
pagenum: 80; title: The elif Statement
pagenum: 80; title: Using Many elif Statements
pagenum: 82; title: A Grading Program
pagenum: 84; title: A Small Sample Program: Absolute Value
pagenum: 84; title: Programming Challenges
pagenum: 86; title: Negative, Positive, Zero
pagenum: 86; title: isSquare
pagenum: 88; title: isEven
pagenum: 91; title: isRectangle
pagenum: 93; title: Conditional Logic
pagenum: 94; title: The Logical not Operator
pagenum: 95; title: The Logical and Operator
pagenum: 95; title: The Logical or Operator
pagenum: 96; title: Precedence of Comparison and Logical Operators
pagenum: 97; title: Booleans in if Statements
pagenum: 98; title: Program to Calculate Shipping
pagenum: 98; title: Summary
pagenum: 101; label: Chapter 6
title: Loops
pagenum: 103; title: User's View of the Game
pagenum: 104; title: Loops
pagenum: 105; title: The while Statement
pagenum: 106; title: First Loop in a Real Program
pagenum: 108; title: Increment and Decrement
pagenum: 109; title: Running a Program Multiple Times
pagenum: 110; title: Python Built-in Packages
pagenum: 111; title: Generating a Random Number
pagenum: 112; title: Simulation of Flipping a Coin
pagenum: 113; title: Other Examples of Using Random Numbers
pagenum: 114; title: Creating an Infinite Loop
pagenum: 115; title: A New Style of Building a Loop: while True, and break
pagenum: 116; title: The continue Statement
pagenum: 118; title: Asking If the User Wants to Repeat: the Empty String
pagenum: 120; title: Pseudocode
pagenum: 120; title: Building the "Guess the Number" Program
pagenum: 121; title: Playing a Game Multiple Times
pagenum: 125; title: Error Checking with try/except
pagenum: 127; title: Building Error-Checking Utility Functions
pagenum: 129; title: Coding Challenge
pagenum: 130; title: Summary
pagenum: 132; label: Chapter 7
title: Lists
pagenum: 133; title: Collections of Data
pagenum: 134; title: Lists
pagenum: 134; title: Elements
pagenum: 135; title: Python Syntax for a List
pagenum: 135; title: Empty List
pagenum: 136; title: Position of an Element in a List: Index
pagenum: 136; title: Accessing an Element in a List
pagenum: 137; title: Using a Variable or Expression as an Index in a List
pagenum: 138; title: Changing a Value in a List
pagenum: 140; title: Using Negative Indices
pagenum: 140; title: Building a Simple Mad Libs Game
pagenum: 141; title: Adding a List to Our Mad Libs Game
pagenum: 142; title: Determining the Number of Elements in a List: The len Function
pagenum: 143; title: Programming Challenge 1
pagenum: 144; title: Using a List Argument with a Function
pagenum: 146; title: Accessing All Elements of a List: Iteration
pagenum: 147; title: for Statements and for Loops
pagenum: 148; title: Programming Challenge 2
pagenum: 150; title: Generating a Range of Numbers
pagenum: 151; title: Programming Challenge 3
pagenum: 152; title: Scientific Simulations
pagenum: 154; title: List Manipulation
pagenum: 157; title: List Manipulation Example: An Inventory Example
pagenum: 158; title: Pizza Toppings Example
pagenum: 159; title: Summary
pagenum: 163; label: Chapter 8
title: Strings
pagenum: 165; title: len Function Applied to Strings
pagenum: 166; title: Indexing Characters in a String
pagenum: 166; title: Accessing Characters in a String
pagenum: 167; title: Iterating Through Characters in a String
pagenum: 168; title: Creating a Substring: A Slice
pagenum: 170; title: Programming Challenge 1: Creating a Slice
pagenum: 171; title: Additional Slicing Syntax
pagenum: 173; title: Slicing As Applied to a List
pagenum: 174; title: Strings Are Not Changeable
pagenum: 174; title: Programming Challenge 2: Searching a String
pagenum: 175; title: Built-in String Operations
pagenum: 176; title: Examples of String Operations
pagenum: 178; title: Programming Challenge 3: Directory Style
pagenum: 178; title: Summary
pagenum: 180; label: Chapter 9
title: File Input/Output
pagenum: 181; title: Saving Files on a Computer
pagenum: 182; title: Defining a Path to a File
pagenum: 182; title: Reading from and Writing to a File
pagenum: 184; title: File Handle
pagenum: 185; title: The Python os Package
pagenum: 186; title: Building Reusable File I/O Functions
pagenum: 186; title: Example Using Our File I/O Functions
pagenum: 187; title: Importing Our Own Modules
pagenum: 188; title: Saving Data to a File and Reading It Back
pagenum: 190; title: Building an Adding Game
pagenum: 192; title: Programming Challenge 1
pagenum: 192; title: Programming Challenge 2
pagenum: 193; title: Writing/Reading One Piece of Data to and from a File
pagenum: 196; title: Writing/Reading Multiple Pieces of Data to and from a File
pagenum: 197; title: The join Function
pagenum: 197; title: The split Function
pagenum: 198; title: Final Version of the Adding Game
pagenum: 199; title: Writing and Reading a Line at a Time with a File
pagenum: 200; title: Example: Multiple Choice Test
pagenum: 203; title: A Compiled Version of a Module
pagenum: 208; title: Summary
pagenum: 208; label: Chapter 10
title: Internet Data
pagenum: 209; title: Request/Response Model
pagenum: 209; title: Request with Values
pagenum: 211; title: Example URL: Getting a Stock Price
pagenum: 211; title: Pretending to Be a Browser
pagenum: 212; title: API
pagenum: 213; title: Example Program to Get Stock Price Information Using an API
pagenum: 214; title: Example Program to Get Exchange Rate Information
pagenum: 216; title: Example Program to Get Powerball Information
pagenum: 219; title: API Key
pagenum: 223; title: URL Encoding
pagenum: 223; title: Summary
pagenum: 225; label: Chapter 11
title: Data Structures
pagenum: 227; title: Tuple
pagenum: 228; title: Lists of Lists
pagenum: 230; title: Representing a Grid or a Spreadsheet
pagenum: 231; title: Representing the World of an Adventure Game
pagenum: 231; title: Reading a Comma-Separated Value (.csv) File
pagenum: 234; title: Dictionary
pagenum: 238; title: Using the in Operator on a Dictionary
pagenum: 240; title: Programming Challenge
pagenum: 241; title: A Python Dictionary to Represent a Programming Dictionary
pagenum: 242; title: Iterating Through a Dictionary
pagenum: 243; title: Combining Lists and Dictionaries
pagenum: 244; title: JSON: JavaScript Object Notation
pagenum: 246; title: Example Program to Get Weather Data
pagenum: 248; title: XML Data
pagenum: 250; title: Accessing Repeating Groupings in JSON and XML
pagenum: 253; title: Summary
pagenum: 255; label: Chapter 12
title: Where to Go from Here
pagenum: 257; title: Python Language Documentation
pagenum: 257; title: Python Standard Library
pagenum: 257; title: Python External Packages
pagenum: 258; title: Python Development Environments
pagenum: 259; title: Places to Find Answers to Questions
pagenum: 259; title: Projects and Practice, Practice, Practice
pagenum: 260; title: Summary
pagenum: 260; title: Index
pagenum: 261