Practical Programming
close menu
Bookswagon
search
My Account
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology Books > Computer programming / software engineering > Practical Programming
Practical Programming

Practical Programming


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Classroom-tested by generations of students, this new edition of the popular intro to programming book is for anyone who wants to understand computer science.


Learn about design, algorithms, testing, and debugging. Discover the fundamentals of programming with Python: a language that's used across industries and platforms. Write programs to solve real-world problems, and come away with everything you need to produce quality code. This edition has been updated to use the new language features in Python 3.14.


No programming experience required! Incremental examples show you the steps and missteps that happen while developing programs, so you know what to expect when you tackle a problem on your own. Inspired by "How to Design Programs" (HtDP), discover a five-step recipe for designing functions, which helps you learn the concepts-and becomes an integral part of writing programs.


In this detailed introduction to Python and to computer programming, find out exactly what happens when your programs are executed. Work with numbers, text, sequences, and files using real-world examples. Create and use your own data types. Make your programs robust and reliable; develop an idiomatic programming style; download data from the web automatically. As you use the fundamental programming tools in this book, you'll see how to document and organize your code so that you and other programmers can more easily read and understand it. This new edition takes advantage of Python 3.14's new features, including f-strings, the walrus operator, and richer type annotations on parameters, return types, and variable declarations.


Most importantly, you'll learn how to think like a professional programmer.



Table of Contents:


  • Acknowledgments
    • Preface
    • Our Approach
    • Further Reading
    • What You’ll See
  • What’s Programming?
    • Programs and Programming
    • What’s a Programming Language?
    • What’s a Bug?
    • The Difference Between Brackets, Braces, and Parentheses
    • Installing Python
  • Hello, Python
    • How Does a Computer Run a Python Program?
    • Expressions and Values: Arithmetic in Python
    • What Is a Type?
    • Variables and Computer Memory: Remembering Values
    • How Python Tells You Something Went Wrong
    • A Single Statement That Spans Multiple Lines
    • Describing Code
    • Making Code Readable
    • The Object of This Chapter
    • Exercises
  • Designing and Using Functions
    • Functions That Python Provides
    • Identities: How Python Keeps Track of Values
    • Defining Custom Functions
    • Using Local Variables for Temporary Storage
    • Tracing Function Calls in the Memory Model
    • Designing New Functions: A Recipe
    • Writing and Running a Program
    • Omitting a return Statement: None
    • Dealing with Situations That Your Code Doesn’t Handle
    • What Did You Call That?
    • Exercises
  • Working with Text
    • Creating Strings of Characters
    • Using Special Characters in Strings
    • Creating a Multiline String
    • Printing Information
    • Getting Information from the Keyboard
    • Formatted Strings
    • Quotes About Strings
    • Exercises
  • Making Choices
    • A Boolean Type
    • Choosing Which Statements to Execute
    • Nested if Statements
    • Memorizing Results of a Boolean Expression Evaluation
    • You Learned About Booleans: True or False?
    • Exercises
  • A Modular Approach to Program Organization
    • Importing Modules
    • Defining Your Modules
    • Testing Your Code Semiautomatically
    • Tips for Grouping Your Functions
    • Organizing Your Thoughts
    • Exercises
  • Using Methods
    • Modules, Classes, and Methods
    • Calling Methods
    • Exploring String Methods
    • What Are Those Underscores?
    • A Methodical Review
    • Exercises
  • Storing Collections of Data Using Lists
    • Storing and Accessing Data in Lists
    • Type Annotations for Lists
    • Modifying Lists
    • Operations on Lists
    • Slicing Lists
    • Aliasing: What’s in a Name?
    • List Methods
    • Working with a List of Lists
    • Splitting Strings
    • A Summary List
    • Exercises
  • Repeating Code Using Loops
    • Processing Items in a List
    • Processing Characters in Strings
    • Looping Over a Range of Numbers
    • Processing Lists Using Indices
    • Nesting Loops in Loops
    • Looping Until a Condition Is Reached
    • Repetition Based on User Input
    • Controlling Loops Using break and continue
    • Repeating What You’ve Learned
    • Exercises
  • Reading and Writing Files
    • What Kinds of Files Are There?
    • Opening a File
    • Techniques for Reading Files
    • Files over the Internet
    • Writing Files
    • Writing Example Calls Using StringIO
    • Writing Algorithms That Use the File-Reading Techniques
    • Multiline Records
    • Looking Ahead
    • Notes to File Away
    • Exercises
  • Storing Data Using Other Collection Types
    • Storing Data Using Sets
    • Storing Data Using Tuples
    • Storing Data Using Dictionaries
    • Inverting a Dictionary
    • Using the in Operator on Tuples, Sets, and Dictionaries
    • Comparing Collections
    • Creating New Type Annotations
    • A Collection of New Information
    • Exercises
  • Designing and Benchmarking Algorithms
    • Searching for the Two Smallest Values
    • Timing the Functions
    • At a Minimum, You Saw This
    • Exercises
  • Searching and Sorting
    • Searching a List
    • Binary Search
    • Sorting
    • More Efficient Sorting Algorithms
    • Merge Sort: A Faster Sorting Algorithm
    • Sorting Out What You Learned
    • Exercises
  • Object-Oriented Programming
    • Understanding a Problem Domain
    • Function isinstance, Class object, and Class Book
    • Writing a Method in Class Book
    • Plugging into Python Syntax: More Special Methods
    • A Little Bit of OO Theory
    • A Case Study: Molecules, Atoms, and PDB Files
    • Classifying What You’ve Learned
    • Exercises
  • Testing and Debugging
    • Why Do You Need to Test?
    • Case Study: Testing above_freezing
    • Case Study: Testing running_sum
    • Choosing Test Cases
    • Hunting Bugs
    • Bugs We’ve Put in Your Ear
    • Exercises
  • Mastering Iteration Tools
    • Core Idioms
    • Functional Programming
    • Built-In and Standard Library Helpers
    • Let’s Reiterate
    • Exercises
  • Handling Exceptions
    • Core Idioms
    • Accessing Exception Details
    • Common Built-in Exceptions
    • Raising and Chaining Exceptions
    • Defining Custom Exceptions
    • Exceptionally Important!
    • Exercises


Review :

I wish I could go back in time and give this book to my 10-year-old self when I first learned programming! It's so much more engaging, practical,  and accessible than the dry introductory programming books that I tried  (and often failed) to comprehend as a kid. I love the authors' hands-on  approach of mixing explanations with code snippets that students can type into the Python prompt.


— Philip Guo, Creator of Online Python Tutor, Assistant Professor, Department of Cognitive Science, UCSD

Practical Programming delivers just what it promises: a clear, readable, usable introduction to programming for beginners. This isn't just a guide to hacking together programs. The book provides foundations to lifelong programming skills: a crisp, consistent, and visual model of memory and execution and a design recipe that will help readers produce quality software.


— Steven Wolfman, Professor of Teaching, Department of Computer Science, University of British Columbia


This excellent text reflects the authors' many years of experience teaching Python to beginning students.  Topics are presented so that each leads naturally to the next, and common novice errors and misconceptions are explicitly addressed. The exercises at the end of each chapter invite interested students to explore computer science and programming language topics.


— Kathleen Freeman, Director of Undergraduate Studies, Department of Computer and Information Science, University of Oregon

I've written and read a lot of introductory texts in my forty-six years as a computer science faculty member. This one takes the cake. It presents the material in an appropriate order, talks in a manner that beginners can understand, and covers topics in a way that helps people learn Python. If I were to teach an introductory course using Python, this is the text I would use.


— David Gries, Professor Emeritus, Department of Computer Science, Cornell University



Best Sellers


Product Details
  • ISBN-13: 9798888652046
  • Publisher: The Pragmatic Programmers
  • Publisher Imprint: The Pragmatic Programmers
  • Edition: New edition
  • Language: English
  • Returnable: 03
  • Spine Width: 20 mm
  • ISBN-10: 8888652043
  • Publisher Date: 30 Jun 2026
  • Binding: Paperback
  • Height: 234 mm
  • No of Pages: 400
  • Returnable: 03
  • Width: 190 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Practical Programming
The Pragmatic Programmers -
Practical Programming
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Practical Programming

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!