{"product_id":"problem-solving-with-python-isbn-9780262552844","title":"Problem Solving with Python","description":"\u003cb\u003eAn innovative new way to teach computational thinking and problem solving that makes programming accessible to anyone.\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003eProblem solving with computation has become a basic literacy required of modern life, but the traditional way we teach students to code doesn’t work for everyone. This innovative textbook provides a highly engaging alternative approach. \u003ci\u003eProblem Solving with Python\u003c\/i\u003e is a hands-on introduction to computational thinking, useful computer science concepts, and the art of computer programming, where skills and ideas are introduced in service of solving an interesting problem.\u003cbr\u003e\u003cbr\u003eEach chapter begins with an ambiguous problem description drawn from everyday life that resolves with a piece of working code. Gradually progressing in difficulty, the book’s three-act structure charts a clear developmental path from novice to skilled programmer. Michael Smith first presents the basics of programming through repeated application of a worklist algorithm, allowing the reader to become comfortable in problem decomposition and fundamentals before attempting more complicated algorithms and approaches. He then shows how to solve real-world problems using the power of abstraction, algorithms, and the right data structures. Finally, the exercises in the book’s last act fully transition the reader from programmer to problem solver. Based on the author's popular class at Harvard, this accessible textbook builds conceptual understanding through practical skills development to enable anyone to master the what and how of computational thinking.\u003cbr\u003e\u003cul\u003e\n\u003cli\u003ePrioritizes the development of computational thinking\u003c\/li\u003e\n\u003cli\u003eDoes not assume students are intrinsically motivated to learn programming\u003c\/li\u003e\n\u003cli\u003eEmphasizes active learning through real-world problems and case studies\u003c\/li\u003e\n\u003cli\u003eIs suitable for students and self-learners from all backgrounds\u003c\/li\u003e\n\u003cli\u003eIncludes coverage of data representation, arithmetic and logical operations, algorithms, networks, computability, operating systems and compilers, memory systems, and security\u003c\/li\u003e\n\u003cli\u003eOffers extensive ancillary resources\u003c\/li\u003e\n\u003c\/ul\u003e\u003cb\u003eContents\u003cbr\u003e\u003c\/b\u003eWelcome\u003cbr\u003e1 Read a Children’s Book\u003cbr\u003eProblem Solving, in General\u003cbr\u003eProblem Solving, in Detail\u003cbr\u003eOur First Computational Problem\u003cbr\u003eImagine a Specific Instance\u003cbr\u003eSketch Using Computational Thinking\u003cbr\u003eCapturing This Thinking\u003cbr\u003eAn Environment for Coding\u003cbr\u003eOur Generic IDE\u003cbr\u003eOur First Pseudocode\u003cbr\u003eComments\u003cbr\u003eCommands and Input Parameters\u003cbr\u003eScripts versus Execution\u003cbr\u003eOur First Error\u003cbr\u003eThe Interactive Interpreter\u003cbr\u003eCode and Transcript Blocks\u003cbr\u003eInteracting with the Interpreter\u003cbr\u003eThe Interpreter as a Calculator\u003cbr\u003ePython Help\u003cbr\u003eRevisiting Our First Error\u003cbr\u003eUndefined Names\u003cbr\u003eTalking through Your Confusion\u003cbr\u003eNaming a Computation’s Result\u003cbr\u003eDebugging\u003cbr\u003eShowtime\u003cbr\u003ePrinting to the Console Pane\u003cbr\u003eStatements, Objects, Attributes, and Types\u003cbr\u003eNamespaces\u003cbr\u003eStrings and String Literals\u003cbr\u003eVariables\u003cbr\u003eValid Names in Python\u003cbr\u003eTerminology Illustrated\u003cbr\u003eAliasing\u003cbr\u003eReading Two Lines\u003cbr\u003eCarriage Returns\u003cbr\u003eReading an Entire Story\u003cbr\u003eCreating a Loop\u003cbr\u003eEnd of File (EOF)\u003cbr\u003eThree Major Tasks\u003cbr\u003eTesting a Condition\u003cbr\u003eExiting the Loop\u003cbr\u003eIndentation\u003cbr\u003eLoop Until\u003cbr\u003eAny Book\u003cbr\u003eThis Problem, in General\u003cbr\u003eHistorical References to Computational Thinking\u003cbr\u003e2 Grab the Dialogue\u003cbr\u003eWhat Is the Current Task?\u003cbr\u003eA New Problem\u003cbr\u003eSplitting the Problem Into Small Pieces\u003cbr\u003eReuse\u003cbr\u003eSwitching between Goals\u003cbr\u003eFinite State Machines\u003cbr\u003eError Handling in FSMs\u003cbr\u003eEncoding the state information\u003cbr\u003eThis or That\u003cbr\u003eWork on a State\u003cbr\u003eStrings as a Sequence of Characters\u003cbr\u003eMembership Test\u003cbr\u003eCoding a Transition\u003cbr\u003eIndexing and Slicing\u003cbr\u003eFor-Loops\u003cbr\u003eString Find\u003cbr\u003eDesign Patterns for Error Handling\u003cbr\u003eNever Go Too Long without Testing\u003cbr\u003eConcatenation, Overloading, and Shorthands\u003cbr\u003eOff-by-One and Other Potential Errors\u003cbr\u003eTesting\u003cbr\u003eBeware of Hidden Assumptions\u003cbr\u003eFunction Composition\u003cbr\u003eAbstraction as Information Hiding\u003cbr\u003eThere Is No Character\u003cbr\u003e3 Replace Text with Emoji\u003cbr\u003eInternationalization\u003cbr\u003eEncoding\u003cbr\u003eStandards\u003cbr\u003eUnicode\u003cbr\u003eA New Problem\u003cbr\u003eDecomposition to Reduce the Problem’s Complexity\u003cbr\u003eStrings as Immutable Sequences\u003cbr\u003eEncode an Emoji in Unicode\u003cbr\u003eMultiple Different Replacements\u003cbr\u003eFeeling Overwhelmed?\u003cbr\u003eFunctions\u003cbr\u003eFunction Definitions\u003cbr\u003eThe Actual Function Definition and Its Invocation\u003cbr\u003eFunction Execution\u003cbr\u003eAbstraction, Decomposition, and Algorithms\u003cbr\u003eDefinition Before Use\u003cbr\u003ePython’s Special Variables\u003cbr\u003eDocstrings\u003cbr\u003eGetting a Feel for Abstraction\u003cbr\u003eAnother Kind of Abstraction\u003cbr\u003eLists Are Sequence Objects\u003cbr\u003eAbstraction Barriers\u003cbr\u003eMethods\u003cbr\u003eModules\u003cbr\u003eRevisiting ‘_main_’\u003cbr\u003ePure Functions\u003cbr\u003e4 Query a Web Resource\u003cbr\u003ePackages and Libraries\u003cbr\u003eAPIs\u003cbr\u003eA New Problem\u003cbr\u003eSearching Wikipedia\u003cbr\u003eThe Client-Server Programming Model\u003cbr\u003eResources, Transactions, and Protocols\u003cbr\u003eThe URL\u003cbr\u003eThe Programmable Web\u003cbr\u003ePython Dictionaries\u003cbr\u003eAn HTTP Response\u003cbr\u003eThe Response Header\u003cbr\u003eJSON and the Response Body\u003cbr\u003eEnumerating Answers for HOLLIS\u003cbr\u003eBeyond Printing\u003cbr\u003eBlocking and Non-blocking Function Calls\u003cbr\u003e5 Play Guess-a-Number\u003cbr\u003eGuessing a Number\u003cbr\u003eThe Player’s Guess\u003cbr\u003eType Conversion\u003cbr\u003eTry and Recover\u003cbr\u003eThe Game Loop\u003cbr\u003eTesting Our Proposed Solution\u003cbr\u003eA Networked Architecture\u003cbr\u003eIts Sequence Diagram\u003cbr\u003eWhen to Use a New Library\u003cbr\u003eSockets in Action\u003cbr\u003eSpecifying the Other Party\u003cbr\u003eSending and Receiving Messages\u003cbr\u003eSize Matters\u003cbr\u003eEncoding Again!\u003cbr\u003eA Simplified Networking Interface\u003cbr\u003eThe Server\u003cbr\u003eA Connection\u003cbr\u003ePicking Up a Call\u003cbr\u003eThe Conversation\u003cbr\u003eProgrammer Beware\u003cbr\u003eRun It!\u003cbr\u003e6 Do You See My Dog?\u003cbr\u003eNumbers and Knowledge\u003cbr\u003eDo You See My Dog?\u003cbr\u003eNo Interpretation, Please\u003cbr\u003eReading a Hexdump\u003cbr\u003eHexadecimal Explained\u003cbr\u003eConverting between Number Systems\u003cbr\u003eDoes the Computer See My Dog?\u003cbr\u003ePainting a Picture\u003cbr\u003eBits\u003cbr\u003eOne Finger, No Thumb\u003cbr\u003eThe Digital Abstraction\u003cbr\u003eBits, Bytes, and Nibbles\u003cbr\u003eSetting a Pixel’s Color\u003cbr\u003eSaturation\u003cbr\u003eOverflow and Underflow\u003cbr\u003eFinding Edges\u003cbr\u003e7 Many but Not Any Number\u003cbr\u003eFloating-Point Numbers and numerical Computing\u003cbr\u003eComputers Struggle with Arithmetic?\u003cbr\u003eThe Range of a FP Number\u003cbr\u003ePrecision\u003cbr\u003eIllustrating This Issue for Precision\u003cbr\u003eGetting Started\u003cbr\u003eOne Bit at a Time\u003cbr\u003eSearching for the Smallest Difference\u003cbr\u003eFP Errors Accumulate\u003cbr\u003e8 What Is My Problem?\u003cbr\u003eData Science\u003cbr\u003eImages as Data about the World\u003cbr\u003eYes, You Must Clean Up\u003cbr\u003eUnderstanding What Might Go Wrong\u003cbr\u003eNoise and Its Removal\u003cbr\u003eThe Power to Create New Realities\u003cbr\u003eA Process for Eliminating Photobombing\u003cbr\u003eThis Data Is Wrong, but...\u003cbr\u003eZero Out the Unnecessary Details\u003cbr\u003eNo Visible Difference\u003cbr\u003eImage Steganography\u003cbr\u003eWhere Is That Pixel?\u003cbr\u003eAnd How Did We Get There?\u003cbr\u003eVisualizing a Traversal\u003cbr\u003eInverting a Pixel’s Color\u003cbr\u003eNaming the Traversal\u003cbr\u003eSpecifying the Range You Want\u003cbr\u003eStoring a 2D Array in Memory\u003cbr\u003eEnd of Act I\u003cbr\u003e9 Find a Phrase\u003cbr\u003eA Complex Problem-to-Be-Solved\u003cbr\u003eSome Basic Facts\u003cbr\u003eWhich Algorithm?\u003cbr\u003eAlgorithms, Formally\u003cbr\u003eA Well-Studied Specification for String Matching\u003cbr\u003eIs a Specification an Algorithm?\u003cbr\u003eA Brute-Force Algorithm\u003cbr\u003eA BF-String-Matching Program\u003cbr\u003eOne Algorithm, Multiple Implementations\u003cbr\u003eEvaluation\u003cbr\u003eEvaluation in Context\u003cbr\u003eMeasuring Performance\u003cbr\u003eHow Do We Do Better?\u003cbr\u003eLoops Are Where the Action Is\u003cbr\u003eComputational Complexity\u003cbr\u003eComputational Complexity in Action\u003cbr\u003eProblem Unsolved\u003cbr\u003e10 Build an Index\u003cbr\u003eStrings to Numbers\u003cbr\u003eA Simple Hash Function\u003cbr\u003eUpdating a Hash with O(1) Work\u003cbr\u003eAllow Collisions\u003cbr\u003eOther Applications of Hashing\u003cbr\u003eIndices for Fast Data Retrieval\u003cbr\u003eHash Tables\u003cbr\u003eThe Speed of Array-Index Operations\u003cbr\u003eWith High Probability\u003cbr\u003eCollision Resolution\u003cbr\u003eSpecification for Creating a Book Index\u003cbr\u003eBuilding Top-Down\u003cbr\u003eUpdating the Index\u003cbr\u003eSort and Strip\u003cbr\u003e11 Discover Driving Directions\u003cbr\u003eA New Approach to Programming\u003cbr\u003eDriving Directions, a Formal Specification\u003cbr\u003eParallels with Finite State Machines\u003cbr\u003eSolutions with Specific Characteristics\u003cbr\u003eLet’s Walk Before We Drive\u003cbr\u003eA Random Walk\u003cbr\u003eWill It Work?\u003cbr\u003eA Short Walk, Please\u003cbr\u003eNo Loops\u003cbr\u003eOnly Visit New Spots\u003cbr\u003eA Dog Walk\u003cbr\u003eSimulation\u003cbr\u003eTo Maps through OO Programming\u003cbr\u003eClasses\u003cbr\u003eBuilding an Instance\u003cbr\u003eSelf and Instance Attributes\u003cbr\u003eMethods\u003cbr\u003eRepresentation Invariant\u003cbr\u003eMagic Methods\u003cbr\u003eBuilding on Others\u003cbr\u003eGeneral Maps\u003cbr\u003eKeeping Track\u003cbr\u003eRemembering How We Got There\u003cbr\u003eThe Solution\u003cbr\u003eDepth-First Search (DFS)\u003cbr\u003eBreadth-First Search (BFS)\u003cbr\u003eInformed Searches\u003cbr\u003e12 Divide and Conquer\u003cbr\u003eA Specification for Sorting\u003cbr\u003eSorting in Python\u003cbr\u003eSorting in Descending Order\u003cbr\u003eSorting with Your Own Comparison Function\u003cbr\u003eSorting Playing Cards\u003cbr\u003eTime Complexity of Brute-Force Sorting\u003cbr\u003eBinary Search\u003cbr\u003eDivide and Conquer\u003cbr\u003eFrom Split to Merge\u003cbr\u003eIterative Merge Sort\u003cbr\u003eRecursion\u003cbr\u003eIterative Factorial\u003cbr\u003eRecursive Merge Sort\u003cbr\u003eBeckett’s Challenge\u003cbr\u003eIts Base Case\u003cbr\u003eThe Play with a Single Actor\u003cbr\u003eLooking for the Pattern\u003cbr\u003eA Polished, Full Solution\u003cbr\u003e13 Rewrite the Error Message\u003cbr\u003eThe Mistakes We Make in Problem Solving\u003cbr\u003eOur Problem-to-Be-Solved\u003cbr\u003eFrom the GUI to the Shell\u003cbr\u003eUnderstanding Paths\u003cbr\u003eFrom Paths to Programs\u003cbr\u003eRedirecting Inputs and Outputs\u003cbr\u003eWhich Output?\u003cbr\u003ePattern Matching\u003cbr\u003eWildcards in the Shell\u003cbr\u003eRegular Expressions\u003cbr\u003eFinding Simple Words\u003cbr\u003eMatching Metacharacters\u003cbr\u003eUsing Res\u003cbr\u003eFinding Filenames\u003cbr\u003ePython RE Extensions\u003cbr\u003ePutting It All Together\u003cbr\u003eShell Pipes\u003cbr\u003eScripting What the Shell Did\u003cbr\u003eConcurrency\u003cbr\u003eMaking python32 Look Like python3\u003cbr\u003e14 The Dream of Bug Fixing\u003cbr\u003eFinding All Bugs\u003cbr\u003eDecision Problems\u003cbr\u003eUncomputable Problems\u003cbr\u003eAn Analysis That Finds a Bug\u003cbr\u003eRunning Our Simple Analysis\u003cbr\u003eA Tool for Running Analyses\u003cbr\u003eGrabbing a Function with a Syntax Error\u003cbr\u003eAnalyzing Other Functions\u003cbr\u003eUsing s\u003cbr\u003eA Non-trivial Decision Problem\u003cbr\u003eAn Indecisive Decision Function\u003cbr\u003eInsight from Indecision\u003cbr\u003eSpecifications without Implementations\u003cbr\u003e15 Embrace Runtime Debugging\u003cbr\u003eThe Duality of Code and Data\u003cbr\u003eBreakpoints and Runtime State\u003cbr\u003eInserting a Breakpoint\u003cbr\u003eInserting a New Statement\u003cbr\u003eIndenting That Statement\u003cbr\u003eLaunching a Script from Another\u003cbr\u003eInstrumenting a Script\u003cbr\u003eREPL\u003cbr\u003e16 Catch Them Early\u003cbr\u003eDivide-by-Zero Bugs\u003cbr\u003eA Silly Coding Error\u003cbr\u003eWhat’s Hidden\u003cbr\u003eWhy Compile?\u003cbr\u003eFinding Type Errors\u003cbr\u003eTo Squiggle or Not\u003cbr\u003eDynamic Typing\u003cbr\u003eWhy Types Are Interesting\u003cbr\u003eTypes versus Values\u003cbr\u003eDynamic Type Checking\u003cbr\u003eStatic Type Checking\u003cbr\u003eType Hints\u003cbr\u003eNo Free Lunch\u003cbr\u003e17 Build Prediction Models\u003cbr\u003ePredicting Home Prices\u003cbr\u003eYour Sister’s Data\u003cbr\u003eSolving This Problem Ourselves\u003cbr\u003eMachine Learning\u003cbr\u003eLabeled Training Data\u003cbr\u003eML Workflow\u003cbr\u003eGetting a Feel for the Data\u003cbr\u003eSet the Prediction Target\u003cbr\u003ePick Some Features\u003cbr\u003eFit the Model to Our Data\u003cbr\u003ePredicting Unseen Data\u003cbr\u003eModel Validation\u003cbr\u003eMaking the Fit Just Right\u003cbr\u003eBias in ML\u003cbr\u003eClassifying Comments as Toxic\u003cbr\u003eMore Art Than Science\u003cbr\u003e18 Use Generative AI\u003cbr\u003eNavigating the Jagged Frontier\u003cbr\u003eMy Use of GAI\u003cbr\u003eLarge Language Models (LLMs)\u003cbr\u003eThe Operation of LLMs\u003cbr\u003eComplexity for Simplicity\u003cbr\u003eTraining a Neural Network\u003cbr\u003eTwo Pieces to Problem Solving with GAI\u003cbr\u003eAn Easy Request?\u003cbr\u003eWrite the Script Ourselves\u003cbr\u003eAsk ChatGPT\u003cbr\u003eIs This Task within the Frontier?\u003cbr\u003eThe Expanding Frontier\u003cbr\u003eHow to Problem Solve with an LLM\u003cbr\u003eWriting Good Prompts\u003cbr\u003eFinal Thoughts\u003cbr\u003eAcknowledgments\u003cbr\u003eIndexMichael D. Smith is the John H. Finley, Jr. Professor of Engineering and Applied Sciences and a Distinguished Service Professor at Harvard University. A devoted undergraduate educator, he helped launch Harvard and MIT’s edX and is a recipient of the Alpha Iota Prize for Excellence in Teaching, the National Science Foundation Young Investigator Award, and the W. E. B. Du Bois Medal.","brand":"The MIT Press","offers":[{"title":"Default Title","offer_id":48233492349157,"sku":"NP9780262552844","price":65.0,"currency_code":"USD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1842\/7735\/files\/9780262552844.jpg?v=1767735146","url":"https:\/\/k12savings.com\/products\/problem-solving-with-python-isbn-9780262552844","provider":"K12savings","version":"1.0","type":"link"}