Building Python Programs, 1st edition

  • Stuart Reges, 
  • Marty Stepp, 
  • Allison Obourn

$16.99per month

Minimum 4-month term, pay monthly or pay $67.96 upfront

Includes:

  • Instant access to eTextbook
  • Search, highlights, notes, and more
  • Expert video lessons and practice questions
  • Videos, study help in multiple subjects. List in FAQs.
  • Practice problems and study guides
  • Q&A with experts and AI tutor
14-day refund guarantee

$10.99per month

Minimum 4-month term, pay monthly or pay $43.96 upfront

Includes:

  • Instant access to eTextbook
  • Search, highlights, notes, and more
14-day refund guarantee

$16.99per month

Minimum 4-month term, pay monthly or pay $67.96 upfront

Includes:

  • Instant access to eTextbook
  • Search, highlights, notes, and more
  • Expert video lessons and practice questions
  • Videos, study help in multiple subjects. List in FAQs.
  • Practice problems and study guides
  • Q&A with experts and AI tutor
14-day refund guarantee

$10.99per month

Minimum 4-month term, pay monthly or pay $43.96 upfront

Includes:

  • Instant access to eTextbook
  • Search, highlights, notes, and more
14-day refund guarantee

$10.99per month

Minimum 4-month term, pay monthly or pay $43.96 upfront

Includes:

  • Instant access to eTextbook
  • Search, highlights, notes, and more
14-day refund guarantee

$10.99per month

Minimum 4-month term, pay monthly or pay $43.96 upfront

Includes:

  • Instant access to eTextbook
  • Search, highlights, notes, and more
14-day refund guarantee

Learn more, spend less

  • Study simpler and faster

    Use flashcards and other study tools in your eTextbook

  • Listen on the go

    Learn how you like with full eTextbook audio

  • Find it fast

    Quickly navigate your eTextbook with search

  • Stay organized

    Access all your eTextbooks in one place

  • Easily continue access

    Keep learning with auto-renew

Overview

Building Python Programs offers you a layered, back-to-basics approach to Python programming. The authors of the long successful Building Java Programs bring their proven, class-tested and back-to-basics strategy to teaching Python programming. Their signature layered approach introduces programming fundamentals first, with new syntax and concepts added over multiple chapters. Object-oriented programming is discussed only after you have developed a basic understanding of Python programming.

The text focuses on problem-solving with an emphasis on algorithmic thinking and is appropriate for the 2-semester sequence in introductory computer science.

Published by Pearson (July 14th 2021) - Copyright © 2019

ISBN-13: 9780137530731

Subject: Programming - Introductory

Category: Python

Overview

Chapter 1 Introduction to Python Programming

  • 1.1 Basic Computing Concepts
    • Why Programming?
    • Hardware and Software
    • The Digital Realm
    • The Process of Programming
    • Why Python?
    • The Python Programming Environment
  • 1.2 And Now: Python
    • Printing Output
    • String Literals (Strings)
    • Escape Sequences
    • Printing a Complex Figure
    • Comments, Whitespace, and Readability
  • 1.3 Program Errors
    • Syntax Errors
    • Logic Errors (Bugs)
  • 1.4 Procedural Decomposition
    • Functions
    • Flow of Control
    • Identifiers and Keywords
    • Functions That Call Other Functions
    • An Example Runtime Error
  • 1.5 Case Study: Drawing Figures
    • Structured Version
    • Final Version without Redundancy
    • Analysis of Flow of Execution

Chapter 2 Data and Definite Loops

  • 2.1 Basic Data Concepts
    • Types
    • Expressions
    • Literals
    • Arithmetic Operators
    • Precedence
    • Mixing and Converting Types
  • 2.2 Variables
    • A Program with Variables
    • Increment/Decrement Operators
    • Printing Multiple Values
  • 2.3 The for Loop
    • Using a Loop Variable
    • Details about Ranges
    • String Multiplication and Printing Partial Lines
    • Nested for Loops
  • 2.4 Managing Complexity
    • Scope
    • Pseudocode
    • Constants
  • 2.5 Case Study: Hourglass Figure
    • Problem Decomposition and Pseudocode
    • Initial Structured Version
    • Adding a Constant

Chapter 3 Parameters and Graphics

  • 3.1 Parameters
    • The Mechanics of Parameters
    • Limitations of Parameters
    • Multiple Parameters
    • Parameters versus Constants
    • Optional Parameters
  • 3.2 Returning Values
    • The math Module
    • The random Module
    • Defining Functions That Return Values
    • Returning Multiple Values
  • 3.3 Interactive Programs
    • Sample Interactive Program
  • 3.4 Graphics
    • Introduction to DrawingPanel
    • Drawing Lines and Shapes
    • Colors
    • Drawing with Loops
    • Text and Fonts
    • Images
    • Procedural Decomposition with Graphics
  • 3.5 Case Study: Projectile Trajectory
    • Unstructured Solution
    • Structured Solution
    • Graphical Version

Chapter 4 Conditional Execution

  • 4.1 if/else Statements
    • Relational Operators
    • Nested if/else Statements
    • Factoring if/else Statements
    • Testing Multiple Conditions
  • 4.2 Cumulative Algorithms
    • Cumulative Sum
    • Min/Max Loops
    • Cumulative Sum with if
    • Roundoff Errors
  • 4.3 Functions with Conditional Execution
    • Preconditions and Postconditions
    • Raising Exceptions
    • Revisiting Return Values
    • Reasoning about Paths
  • 4.4 Strings
    • String Methods
    • Accessing Characters by Index
    • Converting between Letters and Numbers
    • Cumulative Text Algorithms
  • 4.5 Case Study: Basal Metabolic Rate
    • One-Person Unstructured Solution
    • Two-Person Unstructured Solution
    • Two-Person Structured Solution
    • Procedural Design Heuristics

Chapter 5 Program Logic and Indefinite Loops

  • 5.1 The while Loop
    • A Loop to Find the Smallest Divisor
    • Loop Priming
  • 5.2 Fencepost Algorithms
    • Fencepost with if
    • Sentinel Loops
    • Sentinel with Min/Max
  • 5.3 Boolean Logic
    • Logical Operators
    • Boolean Variables and Flags
    • Predicate Functions
    • Boolean Zen
    • Short-Circuited Evaluation
  • 5.4 Robust Programs
    • The try/except Statement
    • Handling User Errors
  • 5.5 Assertions and Program Logic
    • Reasoning about Assertions
    • A Detailed Assertions Example
  • 5.6 Case Study: Number Guessing Game
    • Initial Version without Hinting
    • Randomized Version with Hinting
    • Final Robust Version

Chapter 6 File Processing

  • 6.1 File-Reading Basics
    • Data and Files
    • Reading a File in Python
    • Line-Based File Processing
    • Structure of Files and Consuming Input
    • Prompting for a File
  • 6.2 Token-Based Processing
    • Numeric Input
    • Handling Invalid Input
    • Mixing Lines and Tokens
    • Handling Varying Numbers of Tokens
    • Complex Input Files
  • 6.3 Advanced File Processing
    • Multi-Line Input Records
    • File Output
    • Reading Data from the Web
  • 6.4 Case Study: ZIP Code Lookup

Chapter 7 Lists

  • 7.1 List Basics
    • Creating Lists
    • Accessing List Elements
    • Traversing a List
    • A Complete List Program
    • Random Access
    • List Methods
  • 7.2 List-Traversal Algorithms
    • Lists as Parameters
    • Searching a List
    • Replacing and Removing Values
    • Reversing a List
    • Shifting Values in a List
    • Nested Loop Algorithms
    • List Comprehensions
  • 7.3 Reference Semantics
    • Values and References
    • Modifying a List Parameter
    • The Value None
    • Mutability
    • Tuples
  • 7.4 Multidimensional Lists
    • Rectangular Lists
    • Jagged Lists
    • Lists of Pixels
  • 7.5 Case Study: Benford’s Law
    • Tallying Values
    • Completing the Program

Chapter 8 Dictionaries and Sets

  • 8.1 Dictionary Basics
    • Creating a Dictionary
    • Dictionary Operations
    • Looping Over a Dictionary
    • Dictionary Ordering
  • 8.2 Advanced Dictionary Usage
    • Dictionary for Tallying
    • Nested Collections
    • Dictionary Comprehensions
  • 8.3 Sets
    • Set Basics
    • Set Operations
    • Set Efficiency
    • Set Example: Lottery

Chapter 9 Recursion

  • 9.1 Thinking Recursively
    • A Nonprogramming Example
    • Iteration to Recursion
    • Structure of Recursive Solutions
    • Reversing a File
    • The Recursive Call Stack
  • 9.2 Recursive Functions and Data
    • Integer Exponentiation
    • Greatest Common Divisor
    • Directory Crawler
  • 9.3 Recursive Graphics
    • Cantor Set
    • Sierpinski Triangle
  • 9.4 Recursive Backtracking
    • Traveling North/East
    • Eight Queens Puzzle
    • Stopping after One Solution
  • 9.5 Case Study: Prefix Evaluator
    • Infix, Prefix, and Postfix Notation
    • Evaluating Prefix Expressions
    • Complete Program

Chapter 10 Searching and Sorting

  • 10.1 Searching and Sorting Libraries
    • Binary Search

Your questions answered

Pearson+ is your 1-stop shop with eTextbooks, study tools and exam prep features designed to help students get better grades in college. eTextbooks come with built-in tools that simplify studying, like flashcards, audiobook and search. Pearson+ also features Channels, which includes practice problems, study guides, Q&A with experts, video lessons that help you understand tricky topics and more—all in one place. Channels can be purchased separately or added on to your eTextbook at the time of purchase as part of the Study & Exam Prep Pack.

A Pearson eTextbook is an easy-to-use digital version of your book for class that includes upgraded study tools to help you learn how you learn best. Use enhanced search to find what you need within your eTextbook, highlight and make notes to mark important info, generate flashcards to test your knowledge, and use audio to listen to the text. Every feature is designed to help you learn more efficiently and get results. Plus, you can learn on the go with the Pearson+ app. Find this and more in your eTextbook, available in Pearson+.

The Study & Exam Prep Pack includes practice problems, study guides, Q&A with experts, Channels video lessons that help you understand tricky topics and more. It can be added on to your eTextbook or your MyLab and Mastering learning platform at the time of purchase.

Your eTextbook subscription gives you access for 4 months. You can make a one‑time payment for the initial 4‑month term or pay monthly. If you opt for monthly payments, we will charge your payment method each month until your 4‑month term ends. You can turn on auto‑renew in My account at any time to continue your subscription before your 4‑month term ends.

When you purchase an eTextbook subscription, it will last 4 months. You can renew your subscription by selecting Extend subscription on the Manage subscription page in My account before your initial term ends.

If you extend your subscription, we'll automatically charge you every month. If you made a one‑time payment for your initial 4‑month term, you'll now pay monthly. To make sure your learning is uninterrupted, please check your card details.

To avoid the next payment charge, select Cancel subscription on the Manage subscription page in My account before the renewal date. You can subscribe again in the future by purchasing another eTextbook subscription.

Channels is a video platform with thousands of explanations, solutions and practice problems to help you do homework and prep for exams. Videos are personalized to your course, and tutors walk you through solutions. Plus, interactive AI‑powered summaries and a social community help you better understand lessons from class.

Channels is an additional tool to help you with your studies. This means you can use Channels even if your course uses a non‑Pearson textbook.

When you choose a Channels subscription, you're signing up for a 1‑month, 3‑month or 12‑month term and you make an upfront payment for your subscription. By default, these subscriptions auto‑renew at the frequency you select during checkout.

When you purchase a Channels subscription it will last 1 month, 3 months or 12 months, depending on the plan you chose. Your subscription will automatically renew at the end of your term unless you cancel it.

We use your credit card to renew your subscription automatically. To make sure your learning is uninterrupted, please check your card details.

A Study & Exam Prep subscription includes video lessons, practice problems and other study tools. Get unlimited access to the full range of subjects:

  • General Chemistry
  • Physics
  • General Biology
  • Financial Accounting
  • Psychology
  • Microeconomics
  • Anatomy & Physiology
  • College Algebra
  • Organic Chemistry
  • Genetics
  • GOB Chemistry
  • Intro to Chemistry
  • Microbiology
  • Cell Biolog
  • Analytical Chemistry
  • Trigonometry
  • Precalculus
  • Biochemistry
  • Macroeconomics
  • Yes, the Study & Exam Prep Pack's feature is Channels, which can be purchased separately at any time. Simply go to Channels on the Pearson+ site and choose monthly, quarterly, or annual access, separate from your eTextbook subscription. Still deciding? Watch the first six videos free and buy it if you love it (we know you'll love it!).

    Currently, they are the exact same offering. 'Study & Exam Prep Pack' is what we call 'Channels' when it is bundled with an eTextbook or bundled with MyLab & Mastering courseware. When purchased on its own, you will see it called Channels, still the same study & exam prep help you need.