• Title Algorithmic Problem Solving with Python
  • Author(s) John B. Schneider , Shira Lynn Broschat, Jess Dahmen
  • Publisher: Washington State University (February 22, 2019. Updated Continuously)
  • License(s): Creative Commons Attribution-ShareAlike 4.0 International License
  • Hardcover/Paperback N/A
  • eBook PDF Files and a single PDF (360 pages, 2.1 MB)
  • Language: English
  • ISBN-10: N/A
  • ISBN-13: N/A

This book uses Python to introduce folks to programming and algorithmic thinking. It is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques.

The book deals with some of the most important and challenging areas of programming and computer science in a highly readable manner. It covers both algorithmic theory and programming practice, demonstrating how theory is reflected in real Python programs.

Well-known algorithms and data structures that are built into the Python language are explained, and the user is shown how to implement and evaluate others.

If you are a Python lover and looking to learn EVERYTHING you need to learn about the Python approach to algorithm design and analysis, this book is exactly what you need.

  • John B. Schneider is an Associate Professor of Electrical Engineering & Computer Science at Washington State University.
  • Python Programming
  • Algorithms and Data Structures
  • Computational Complexity
  • Algorithmic Problem Solving with Python (John B. Schneider, et al)
  • The Mirror Site (1) - Videos Lectures
  • The Mirror Site (2) - PDF
  • Book Homepage (Code and Data, Solutions, Video, etc.)

algorithmic problem solving with python pdf

This book covers Analysis and Design of Algorithms, Scientific Computing, Monte Carlo Simulations, and Parallel Algorithms. It teaches the core knowledge required by any scientist interested in numerical algorithms and computational finance.

algorithmic problem solving with python pdf

This is a textbook about computer science. It is also about Python. However, there is much more. The tools and techniques that you learn here will be applied over and over as you continue your study of computer science.

algorithmic problem solving with python pdf

It promotes object-oriented design using Python and illustrates the use of the latest object-oriented design patterns. Virtually all the data structures are discussed in the context of a single class hierarchy.

algorithmic problem solving with python pdf

Learn how to use Python to write programs that do in minutes what would take you hours to do by hand - no prior programming experience required. You'll create Python programs that effortlessly perform useful and impressive feats of automation.

algorithmic problem solving with python pdf

This hands-on guide takes you through the Python programming language a step at a time, beginning with basic programming concepts before moving on to functions, recursion, data structures, and object-oriented design. 2nd edition updated for Python 3.

algorithmic problem solving with python pdf

It focuses on introducing programming techniques and developing good habits. To that end, our approach avoids some of the more esoteric features of Python and concentrates on the programming basics that transfer directly to other imperative programming.

algorithmic problem solving with python pdf

This book deepens your knowledge of problem-solving techniques from the realm of computer science by challenging you with time-tested scenarios, exercises, and algorithms. As you work through examples in search, clustering, graphs, and more.

algorithmic problem solving with python pdf

The algorithmic approach to solving problems in computer technology is an essential tool. This book presents a readable, entertaining, and energetic book that will motivate and challenge students to open their minds to the algorithmic nature of problem solving.

algorithmic problem solving with python pdf

  • IT Research Library
  • Books by O'Reilly®
  • Pro Certificates Studies
  • Careers and Job Interviews
  • Project Management
  • Search Engines
  • Developer Tools
  • Bargin Computer Books
  • Free IT Magazines
  • About This Site

School of Electrical Engineering and Computer Science Washington State University

Algorithmic problem solving with python.

  • Table of Contents
  • Scratch ActiveCode
  • Navigation Help
  • Help for Instructors
  • About Runestone
  • Report A Problem
  • 1. Introduction
  • 2. Analysis
  • 3. Basic Data Structures
  • 4. Recursion
  • 5. Sorting and Searching
  • 6. Trees and Tree Algorithms
  • 7. Graphs and Graph Algorithms

Problem Solving with Algorithms and Data Structures using Python ¶

By Brad Miller and David Ranum, Luther College (as remixed by Jeffrey Elkner)

  • 1.1. Objectives
  • 1.2. Getting Started
  • 1.3. What Is Computer Science?
  • 1.4. What Is Programming?
  • 1.5. Why Study Data Structures and Abstract Data Types?
  • 1.6. Why Study Algorithms?
  • 1.7. Review of Basic Python
  • 1.8.1. Built-in Atomic Data Types
  • 1.8.2. Built-in Collection Data Types
  • 1.9.1. String Formatting
  • 1.10. Control Structures
  • 1.11. Exception Handling
  • 1.12. Defining Functions
  • 1.13.1. A Fraction Class
  • 1.13.2. Inheritance: Logic Gates and Circuits
  • 1.14. Summary
  • 1.15. Key Terms
  • 1.16. Discussion Questions
  • 1.17. Programming Exercises
  • 2.1. Objectives
  • 2.2. What Is Algorithm Analysis?
  • 2.3. Big-O Notation
  • 2.4.1. Solution 1: Checking Off
  • 2.4.2. Solution 2: Sort and Compare
  • 2.4.3. Solution 3: Brute Force
  • 2.4.4. Solution 4: Count and Compare
  • 2.5. Performance of Python Data Structures
  • 2.7. Dictionaries
  • 2.8. Summary
  • 2.9. Key Terms
  • 2.10. Discussion Questions
  • 2.11. Programming Exercises
  • 3.1. Objectives
  • 3.2. What Are Linear Structures?
  • 3.3. What is a Stack?
  • 3.4. The Stack Abstract Data Type
  • 3.5. Implementing a Stack in Python
  • 3.6. Simple Balanced Parentheses
  • 3.7. Balanced Symbols (A General Case)
  • 3.8. Converting Decimal Numbers to Binary Numbers
  • 3.9.1. Conversion of Infix Expressions to Prefix and Postfix
  • 3.9.2. General Infix-to-Postfix Conversion
  • 3.9.3. Postfix Evaluation
  • 3.10. What Is a Queue?
  • 3.11. The Queue Abstract Data Type
  • 3.12. Implementing a Queue in Python
  • 3.13. Simulation: Hot Potato
  • 3.14.1. Main Simulation Steps
  • 3.14.2. Python Implementation
  • 3.14.3. Discussion
  • 3.15. What Is a Deque?
  • 3.16. The Deque Abstract Data Type
  • 3.17. Implementing a Deque in Python
  • 3.18. Palindrome-Checker
  • 3.19. Lists
  • 3.20. The Unordered List Abstract Data Type
  • 3.21.1. The Node Class
  • 3.21.2. The Unordered List Class
  • 3.22. The Ordered List Abstract Data Type
  • 3.23.1. Analysis of Linked Lists
  • 3.24. Summary
  • 3.25. Key Terms
  • 3.26. Discussion Questions
  • 3.27. Programming Exercises
  • 4.1. Objectives
  • 4.2. What Is Recursion?
  • 4.3. Calculating the Sum of a List of Numbers
  • 4.4. The Three Laws of Recursion
  • 4.5. Converting an Integer to a String in Any Base
  • 4.6. Stack Frames: Implementing Recursion
  • 4.7. Introduction: Visualizing Recursion
  • 4.8. Sierpinski Triangle
  • 4.9. Complex Recursive Problems
  • 4.10. Tower of Hanoi
  • 4.11. Exploring a Maze
  • 4.12. Dynamic Programming
  • 4.13. Summary
  • 4.14. Key Terms
  • 4.15. Discussion Questions
  • 4.16. Glossary
  • 4.17. Programming Exercises
  • 5.1. Objectives
  • 5.2. Searching
  • 5.3.1. Analysis of Sequential Search
  • 5.4.1. Analysis of Binary Search
  • 5.5.1. Hash Functions
  • 5.5.2. Collision Resolution
  • 5.5.3. Implementing the Map Abstract Data Type
  • 5.5.4. Analysis of Hashing
  • 5.6. Sorting
  • 5.7. The Bubble Sort
  • 5.8. The Selection Sort
  • 5.9. The Insertion Sort
  • 5.10. The Shell Sort
  • 5.11. The Merge Sort
  • 5.12. The Quick Sort
  • 5.13. Summary
  • 5.14. Key Terms
  • 5.15. Discussion Questions
  • 5.16. Programming Exercises
  • 6.1. Objectives
  • 6.2. Examples of Trees
  • 6.3. Vocabulary and Definitions
  • 6.4. List of Lists Representation
  • 6.5. Nodes and References
  • 6.6. Parse Tree
  • 6.7. Tree Traversals
  • 6.8. Priority Queues with Binary Heaps
  • 6.9. Binary Heap Operations
  • 6.10.1. The Structure Property
  • 6.10.2. The Heap Order Property
  • 6.10.3. Heap Operations
  • 6.11. Binary Search Trees
  • 6.12. Search Tree Operations
  • 6.13. Search Tree Implementation
  • 6.14. Search Tree Analysis
  • 6.15. Balanced Binary Search Trees
  • 6.16. AVL Tree Performance
  • 6.17. AVL Tree Implementation
  • 6.18. Summary of Map ADT Implementations
  • 6.19. Summary
  • 6.20. Key Terms
  • 6.21. Discussion Questions
  • 6.22. Programming Exercises
  • 7.1. Objectives
  • 7.2. Vocabulary and Definitions
  • 7.3. The Graph Abstract Data Type
  • 7.4. An Adjacency Matrix
  • 7.5. An Adjacency List
  • 7.6. Implementation
  • 7.7. The Word Ladder Problem
  • 7.8. Building the Word Ladder Graph
  • 7.9. Implementing Breadth First Search
  • 7.10. Breadth First Search Analysis
  • 7.11. The Knight’s Tour Problem
  • 7.12. Building the Knight’s Tour Graph
  • 7.13. Implementing Knight’s Tour
  • 7.14. Knight’s Tour Analysis
  • 7.15. General Depth First Search
  • 7.16. Depth First Search Analysis
  • 7.17. Topological Sorting
  • 7.18. Strongly Connected Components
  • 7.19. Shortest Path Problems
  • 7.20. Dijkstra’s Algorithm
  • 7.21. Analysis of Dijkstra’s Algorithm
  • 7.22. Prim’s Spanning Tree Algorithm
  • 7.23. Summary
  • 7.24. Key Terms
  • 7.25. Discussion Questions
  • 7.26. Programming Exercises

Acknowledgements ¶

We are very grateful to Franklin Beedle Publishers for allowing us to make this interactive textbook freely available. This online version is dedicated to the memory of our first editor, Jim Leisy, who wanted us to “change the world.”

Indices and tables ¶

  • Module Index
  • Search Page

Creative Commons License

algorithmic problem solving with python pdf

  • Runestone in social media: Follow @iRunestone Our Facebook Page
  • Table of Contents
  • Assignments
  • Peer Instruction (Instructor)
  • Peer Instruction (Student)
  • Change Course
  • Instructor's Page
  • Progress Page
  • Edit Profile
  • Change Password
  • Scratch ActiveCode
  • Scratch Activecode
  • Instructors Guide
  • About Runestone
  • Report A Problem
  • This Chapter
  • 1. Introduction' data-toggle="tooltip" >

Problem Solving with Algorithms and Data Structures using Python ¶

PythonDS Cover

By Brad Miller and David Ranum, Luther College

There is a wonderful collection of YouTube videos recorded by Gerry Jenkins to support all of the chapters in this text.

  • 1.1. Objectives
  • 1.2. Getting Started
  • 1.3. What Is Computer Science?
  • 1.4. What Is Programming?
  • 1.5. Why Study Data Structures and Abstract Data Types?
  • 1.6. Why Study Algorithms?
  • 1.7. Review of Basic Python
  • 1.8.1. Built-in Atomic Data Types
  • 1.8.2. Built-in Collection Data Types
  • 1.9.1. String Formatting
  • 1.10. Control Structures
  • 1.11. Exception Handling
  • 1.12. Defining Functions
  • 1.13.1. A Fraction Class
  • 1.13.2. Inheritance: Logic Gates and Circuits
  • 1.14. Summary
  • 1.15. Key Terms
  • 1.16. Discussion Questions
  • 1.17. Programming Exercises
  • 2.1.1. A Basic implementation of the MSDie class
  • 2.2. Making your Class Comparable
  • 3.1. Objectives
  • 3.2. What Is Algorithm Analysis?
  • 3.3. Big-O Notation
  • 3.4.1. Solution 1: Checking Off
  • 3.4.2. Solution 2: Sort and Compare
  • 3.4.3. Solution 3: Brute Force
  • 3.4.4. Solution 4: Count and Compare
  • 3.5. Performance of Python Data Structures
  • 3.7. Dictionaries
  • 3.8. Summary
  • 3.9. Key Terms
  • 3.10. Discussion Questions
  • 3.11. Programming Exercises
  • 4.1. Objectives
  • 4.2. What Are Linear Structures?
  • 4.3. What is a Stack?
  • 4.4. The Stack Abstract Data Type
  • 4.5. Implementing a Stack in Python
  • 4.6. Simple Balanced Parentheses
  • 4.7. Balanced Symbols (A General Case)
  • 4.8. Converting Decimal Numbers to Binary Numbers
  • 4.9.1. Conversion of Infix Expressions to Prefix and Postfix
  • 4.9.2. General Infix-to-Postfix Conversion
  • 4.9.3. Postfix Evaluation
  • 4.10. What Is a Queue?
  • 4.11. The Queue Abstract Data Type
  • 4.12. Implementing a Queue in Python
  • 4.13. Simulation: Hot Potato
  • 4.14.1. Main Simulation Steps
  • 4.14.2. Python Implementation
  • 4.14.3. Discussion
  • 4.15. What Is a Deque?
  • 4.16. The Deque Abstract Data Type
  • 4.17. Implementing a Deque in Python
  • 4.18. Palindrome-Checker
  • 4.19. Lists
  • 4.20. The Unordered List Abstract Data Type
  • 4.21.1. The Node Class
  • 4.21.2. The Unordered List Class
  • 4.22. The Ordered List Abstract Data Type
  • 4.23.1. Analysis of Linked Lists
  • 4.24. Summary
  • 4.25. Key Terms
  • 4.26. Discussion Questions
  • 4.27. Programming Exercises
  • 5.1. Objectives
  • 5.2. What Is Recursion?
  • 5.3. Calculating the Sum of a List of Numbers
  • 5.4. The Three Laws of Recursion
  • 5.5. Converting an Integer to a String in Any Base
  • 5.6. Stack Frames: Implementing Recursion
  • 5.7. Introduction: Visualizing Recursion
  • 5.8. Sierpinski Triangle
  • 5.9. Complex Recursive Problems
  • 5.10. Tower of Hanoi
  • 5.11. Exploring a Maze
  • 5.12. Dynamic Programming
  • 5.13. Summary
  • 5.14. Key Terms
  • 5.15. Discussion Questions
  • 5.16. Glossary
  • 5.17. Programming Exercises
  • 6.1. Objectives
  • 6.2. Searching
  • 6.3.1. Analysis of Sequential Search
  • 6.4.1. Analysis of Binary Search
  • 6.5.1. Hash Functions
  • 6.5.2. Collision Resolution
  • 6.5.3. Implementing the Map Abstract Data Type
  • 6.5.4. Analysis of Hashing
  • 6.6. Sorting
  • 6.7. The Bubble Sort
  • 6.8. The Selection Sort
  • 6.9. The Insertion Sort
  • 6.10. The Shell Sort
  • 6.11. The Merge Sort
  • 6.12. The Quick Sort
  • 6.13. Summary
  • 6.14. Key Terms
  • 6.15. Discussion Questions
  • 6.16. Programming Exercises
  • 7.1. Objectives
  • 7.2. Examples of Trees
  • 7.3. Vocabulary and Definitions
  • 7.4. List of Lists Representation
  • 7.5. Nodes and References
  • 7.6. Parse Tree
  • 7.7. Tree Traversals
  • 7.8. Priority Queues with Binary Heaps
  • 7.9. Binary Heap Operations
  • 7.10.1. The Structure Property
  • 7.10.2. The Heap Order Property
  • 7.10.3. Heap Operations
  • 7.11. Binary Search Trees
  • 7.12. Search Tree Operations
  • 7.13. Search Tree Implementation
  • 7.14. Search Tree Analysis
  • 7.15. Balanced Binary Search Trees
  • 7.16. AVL Tree Performance
  • 7.17. AVL Tree Implementation
  • 7.18. Summary of Map ADT Implementations
  • 7.19. Summary
  • 7.20. Key Terms
  • 7.21. Discussion Questions
  • 7.22. Programming Exercises
  • 8.1. Objectives
  • 8.2. Vocabulary and Definitions
  • 8.3. The Graph Abstract Data Type
  • 8.4. An Adjacency Matrix
  • 8.5. An Adjacency List
  • 8.6. Implementation
  • 8.7. The Word Ladder Problem
  • 8.8. Building the Word Ladder Graph
  • 8.9. Implementing Breadth First Search
  • 8.10. Breadth First Search Analysis
  • 8.11. The Knight’s Tour Problem
  • 8.12. Building the Knight’s Tour Graph
  • 8.13. Implementing Knight’s Tour
  • 8.14. Knight’s Tour Analysis
  • 8.15. General Depth First Search
  • 8.16. Depth First Search Analysis
  • 8.17. Topological Sorting
  • 8.18. Strongly Connected Components
  • 8.19. Shortest Path Problems
  • 8.20. Dijkstra’s Algorithm
  • 8.21. Analysis of Dijkstra’s Algorithm
  • 8.22. Prim’s Spanning Tree Algorithm
  • 8.23. Summary
  • 8.24. Key Terms
  • 8.25. Discussion Questions
  • 8.26. Programming Exercises

Acknowledgements ¶

We are very grateful to Franklin Beedle Publishers for allowing us to make this interactive textbook freely available. This online version is dedicated to the memory of our first editor, Jim Leisy, who wanted us to “change the world.”

Indices and tables ¶

Search Page

Creative Commons License

Mastering Algorithms for Problem Solving in Python

Python Algorithms

Mastering Basic Algorithms in the Python Language

  • © 2010
  • Magnus Lie Hetland

You can also search for this author in PubMed   Google Scholar

  • Learn to implement classic algorithms and design new problem-solving algorithms using Python.

182k Accesses

4 Citations

4 Altmetric

  • Table of contents

About this book

About the author, bibliographic information.

  • Publish with us

This is a preview of subscription content, log in via an institution to check access.

Access this book

  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

Licence this eBook for your library

Institutional subscriptions

Table of contents(11 chapters)

Front matter, introduction, counting 101, induction and recursion… and reduction, traversal: the skeleton key of algorithmics, divide, combine, and conquer, greed is good prove it, tangled dependencies and memoization, from a to b with edsger and friends, matchings, cuts, and flows, hard problems and (limited) sloppiness, back matter.

  • algorithmics
  • computer science
  • programming
  • The book deals with some of the most important and challenging areas of programming and computer science, but in a highly pedagogic and readable manner.
  • The book covers both algorithmic theory and programming practice, demonstrating how theory is reflected in real Python programs.
  • Well-known algorithms and data structures that are built into the Python language are explained, and the user is shown how to implement and evaluate others himself.

Book Title : Python Algorithms

Book Subtitle : Mastering Basic Algorithms in the Python Language

Authors : Magnus Lie Hetland

DOI : https://doi.org/10.1007/978-1-4302-3238-4

Publisher : Apress Berkeley, CA

eBook Packages : Professional and Applied Computing , Apress Access Books , Professional and Applied Computing (R0)

Copyright Information : Magnus Lie Hetland 2010

Softcover ISBN : 978-1-4302-3237-7 Published: 24 November 2010

eBook ISBN : 978-1-4302-3238-4 Published: 27 February 2011

Edition Number : 1

Number of Pages : XVI, 336

Topics : Python , Software Engineering/Programming and Operating Systems

Policies and ethics

  • Find a journal
  • Track your research

Academia.edu no longer supports Internet Explorer.

To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to  upgrade your browser .

Enter the email address you signed up with and we'll email you a reset link.

  • We're Hiring!
  • Help Center

paper cover thumbnail

Algorithms Every Programmer Should Know Hone your problem-solving skills by learning different algorithms and their implementation in Python

Profile image of Kavya Mishra

Related Papers

Camilo Vargas

algorithmic problem solving with python pdf

alexander shen

Nakul Singh

IEEE Software

John Favaro

Enormous advances in computing power and programming environments have obscured the importance of algorithms, one of the foundational pillars of software engineering. Today, even university curricula too often pay only lip service to the teaching of algorithmic fundamentals, reinforcing the popular belief that their place at the core of a software engineer's education is past. Yet even today, the importance of algorithms in software engineering has not diminished, and the effects of neglect are evident everywhere in needlessly inefficient industrial applications. The study of algorithms must regain its rightful place of central importance in the everyday work of today's practitioner.

Diego Fernando Aguilar Mateus

In this book, Thomas Cormen, talks about most of the commonly used algorithms used in Software development

Luis Garcia

Nurullah Shahin

Marcos Porto

jyothi gandhamaneni

RELATED PAPERS

Food Research International

Arno Duijster , Henk Van As

IRMA NURVITA ZERLINDA

Solange Houssay

Katalin Baranyai

Journal of Neuroinflammation

Kimberly Byrnes

International Ophthalmology

PRADEEP TEKADE

Wagner Bettiol

Journal of Mathematical Imaging and Vision

Congreso Nacional de …

Violeta Mugica

Shaef Aufan Achmed

Thermal Science

Izet Smajevic

Hashim Butt

Giovanni Gorini

Science Signaling

Sandip Patel

Environmental science and pollution research international

Marc Girondot

ISIJ International

Kazuki Morita

Filippo Di Benedetto tra Boccaccio e Ciriaco d'Ancona. Seminario di studi nel decennale della morte (Messina, 6-7 dicembre 2022)

Francesco Galatà

Progress in Pattern Recognition, Image Analysis, Computer Vision, and Applications

paolo brambilla

International Journal of Pediatrics

mahan Emadian

IEEE Transactions on Software Engineering

khouloud gaaloul

Proceedings of the 4th Sriwijaya University Learning and Education International Conference (SULE-IC 2020)

Yanty Wirza

Arte Decolonial para Crianças

Gabrielle Nascimento

Scientific Reports

Colin A Chapman

Kahramanmaraş Sütçü İmam Üniversitesi Tarım ve Doğa Dergisi

PARADIGMAS, …

Andres Roussos

See More Documents Like This

  •   We're Hiring!
  •   Help Center
  • Find new research papers in:
  • Health Sciences
  • Earth Sciences
  • Cognitive Science
  • Mathematics
  • Computer Science
  • Academia ©2024

Computational Thinking: A Beginner’s Guide to Problem-Solving and Programming

Computational Thinking: A Beginner’s Guide to Problem-Solving and Programming (PDF)

Karl beecher, explore pdf.

Convert PDF

  • Convert to EPUB
  • Convert to MOBI
  • Convert to AZW3
  • Convert to FB2

Read PDF online

Leave a comment.

Your email address will not be published. Required fields are marked *

Summary Computational Thinking: A Beginner’s Guide to Problem-Solving and Programming

A ‘must-read’ for students embarking on their first major projects, and any teacher stepping up to the challenge of teaching Computing at school. This is not just a book about programming, more a template for teaching. Karl Beecher speaks in plain English. Incisive insight and practical advice, standing independent of the Python exemplars used, predicated as it is on a holistic understanding of the subject terrain. Roger Davies, Director of IT, Queen Elizabeth School, and Editor, Computing At School, Tenderfoot Training Project I really enjoyed this book - it bridges the gap between the very practical, but perhaps narrow, field of computer programming with the real world problems that computer sci- entists might need to solve. The issue with encouraging young people to learn ‘coding’ is that they often struggle to understand how and when to use specific concepts and ideas. The underlying principles and real world applications are essential, and much harder to put across, than remembering the syntax for an IF statement. The discussions are presented in a readable format that would be suitable for bright GCSE students and should be essential reading for all A Level computer scientists. With the shift in focus at GCSE and A Level alike, from ‘programming’ to ‘computational thinking’, explanations and examples of abstraction, decomposition and generalisation, along with modelling, logic and efficiency are both engaging and useful. Mark Clarkson , Subject Leader and CAS Master Teacher Computational Thinking is a sprint through the theoretical underpinnings of computa- tion through to their application and the creation of software. The thirteen chapters start with an explanation of what is computational thinking, move through logical and algorithmic thinking, abstraction and modelling, to then focus on how to apply these concepts. The middle set of chapters cover how to create software with a focus on object-oriented solutions with a relatively short discussion on testing. Python is used as the programming language to demonstrate the use of the various techniques introduced in the early chapters but it would be straight forward to convert the examples to other similar languages such as Java, C#, etc. The final chapter provides a guided example based on the creation of a computer-controlled home automation system. Each chapter has a set of exercises to work through and model answers for these are supplied in an appendix. This is a very good overview of a very large field. While all of the topics are deserving of their own book the strength of this book is the explanation and demonstration of their close relationships. This book is an excellent complement to the many books on the Raspberry Pi and Python programming because it starts to explain some of the theoreti- cal underpinnings. The seasoned software developer should not be discouraged by the beginner’s guide sub-title as this is also a good refresher on some of the basics. Colin Smythe, Dunelm Services Limited, Principal Consultant A scholarly book albeit written from a pragmatic perspective distilling the knowledge and expertise of an experienced software developer into a form that is accessible for beginners. It’s engaging exercises and comprehensive references make it an invaluable learning resource. I would recommend it to anyone who wishes to gain an understand- ing of computational thinking and best practice in modern software development. Professor Cornelia Boldyreff, University of Greenwich

This book will prove an excellent companion to more general texts on Computing, espe- cially for teachers who are new to the subject. And with exercises at the end of each chapter, there is much to challenge students also. Highly recommended. Terry Freedman, independent education technology writer and consultant, and publisher of the ICT and Computing in Education website at www.ictineducation.org

COMPUTATIONAL THINKING

BCS, THE CHARTERED INSTITUTE FOR IT BCS, The Chartered Institute for IT, champions the global IT profession and the interests of individuals engaged in that profession for the benefit of all. We promote wider social and economic progress through the advancement of information technology science and practice. We bring together industry, academics, practitioners and government to share knowledge, promote new thinking, inform the design of new curricula, shape public policy and inform the public. Our vision is to be a world-class organisation for IT. Our 75,000-strong membership includes practitioners, businesses, academics and students in the UK and internationally. We deliver a range of professional development tools for practitioners and employees. A leading IT qualification body, we offer a range of widely recognised qualifications. Further Information BCS, The Chartered Institute for IT, First Floor, Block D, North Star House, North Star Avenue, Swindon, SN2 1FA, UK. T +44 (0) 1793 417 424 F +44 (0) 1793 417 444 www.bcs.org/contact http://shop.bcs.org/

COMPUTATIONAL THINKING A beginner’s guide to problem- solving and programming Karl Beecher

© BCS Learning & Development Ltd 2017 The right of the author to be identified as author of this work has been asserted by him in accordance with sections 77 and 78 of the Copyright, Designs and Patents Act 1988. All rights reserved. Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted by the Copyright Designs and Patents Act 1988, no part of this publication may be reproduced, stored or transmitted in any form or by any means, except with the prior permission in writing of the publisher, or in the case of reprographic reproduction, in accordance with the terms of the licences issued by the Copyright Licensing Agency. Enquiries for permission to reproduce material outside those terms should be directed to the publisher. All trademarks, registered names etc. acknowledged in this publication are the property of their respective owners. BCS and the BCS logo are the registered trademarks of the British Computer Society, charity number 292786 (BCS). Published by BCS Learning & Development Ltd, a wholly owned subsidiary of BCS, The Chartered Institute for IT, First Floor, Block D, North Star House, North Star Avenue, Swindon, SN2 1FA, UK. www.bcs.org Paperback ISBN: 978-1-78017-36-41 PDF ISBN-13: 978-1-78017-36-58 EPUB ISBN-13: 978-1-78017-36-65 Kindle ISBN-13: 978-1-78017-36-72 British Cataloguing in Publication Data. A CIP catalogue record for this book is available at the British Library. Disclaimer: The views expressed in this book are those of the author and do not necessarily reflect the views of the Institute or BCS Learning & Development Ltd except where explicitly stated as such. Although every care has been taken by the author and BCS Learning & Development Ltd in the preparation of the publication, no warranty is given by the author or BCS Learning & Development Ltd as publisher as to the accuracy or com- pleteness of the information contained within it and neither the author nor BCS Learning & Development Ltd shall be responsible or liable for any loss or damage whatsoever arising by virtue of such information or any instructions or advice contained within this publication or by any of the aforementioned. Typeset by Lapiz Digital Services, Chennai, India. vi

CONTENTS List of figures and tables xi Author xiv Acknowledgements xv Glosary xvi INTRODUCTION: WHY STUDY COMPUTATIONAL THINKING? 1 PART I COMPUTATIONAL THINKING 5 1. WHAT IS COMPUTATIONAL THINKING? 7 Objectives 7 What is computational thinking? 7 How is computational thinking used? 9 Disclaimers 11 Summary 13 Exercises 13 2. LOGICAL AND ALGORITHMIC THINKING 14 Objectives 14 Approach 14 Logical thinking 15 Algorithmic thinking 25 ‘Gotchas’ 30 Summary 36 Exercises 37 3. PROBLEM-SOLVING AND DECOMPOSITION 39 Objectives 39 Where to start 39 Defining the problem 40 Devising a solution: Something to keep in mind 42 Decomposition 43 Other effective strategies 47 Patterns and generalisation 50 Summary 54 Exercises 55 4. ABSTRACTION AND MODELLING 57 Objectives 57 Abstraction 57 vii

CONTENTS Modeling 64 Summary 74 Exercises 74 5. ANTICIPATING AND DEALING WITH ERRORS 76 Objectives 76 Coming to terms with bugs 76 Designing out the bugs 77 Mitigating errors 80 Testing 82 Debugging 85 You can’t have everything: Deciding which errors to fix 88 Summary 90 Exercises 90 6. EVALUATING A SOLUTION 92 Objectives 92 Solution evaluation 92 Is it correct? 93 Is it efficient? 94 Is it elegant? 97 Is it usable? 99 Trade-offs 101 Summary 104 Exercises 105 PART II COMPUTATIONAL THINKING IN SOFTWARE DEVELOPMENT 107 7. TUTORIAL FOR PYTHON BEGINNERS 109 Objectives 109 Introducing Python 109 First steps 109 Basic types 110 Basic operations 111 Functions 112 Comments 113 Summary 113 Exercises 113 8. EFFECTIVE BUILDING BLOCKS 115 Objectives 115 Logic 115 Basic algorithmic constructs 116 Program state 124 More advanced constructs 131 Summary 137 Exercises 138 9. ORGANISING YOUR CODE 139 Objectives 139 Recap 139 viii

CONTENTS Introducing tkinter 140 Separating concerns 141 Defining information scope 145 Using modules 150 Packages 157 Summary 159 Exercises 160 10. USING ABSTRACTIONS AND PATTERNS 162 Objectives 162 Finding patterns in programs 162 Abstractions in programming 164 Built-in types 165 Creating your own types 166 Ready-made patterns 175 Summary 182 Exercises 182 11. EFFECTIVE MODELLING 184 Objectives 184 Recap 184 Entities 186 Relationships 189 Processes 194 Usage 196 General advice 199 Summary 201 Exercises 201 12. TESTING AND EVALUATING PROGRAMS 203 Objectives 203 Introduction to program testing and evaluation 203 Anticipating bugs 203 Verification and validation 209 Testing the parts 210 Testing the whole 214 Debugging 219 Summary 225 Exercises 225 13. A GUIDED EXAMPLE 227 Problem definition 227 Problem decomposition 228 Finding patterns 229 Form generalisations and abstractions 232 Models 233 Annotated source code 237 Testing 243 Opportunities for improvement 246 ix

Advertisement

Related books

Matlab: A Practical Introduction to Programming and Problem Solving

2017 • 598 Pages • 21.51 MB

Dynamic Programming for Coding Interviews: A Bottom-Up Approach to Problem Solving

2017 • 136 Pages • 41.97 MB

A Beginner's Guide to Programming in R

2015 • 123 Pages • 3.99 MB

PureBasic - A Beginner's Guide To Computer Programming

2009 • 352 Pages • 3.43 MB

Anarchism: A Beginner's Guide (Oneworld Beginners' Guides)

2005 • 189 Pages • 1.15 MB

Head First Learn to Code: A Learner’s Guide to Coding and Computational Thinking

2018 • 991 Pages • 134.61 MB

Head First Learn to Code: A Learner’s Guide to Coding and Computational Thinking

2018 • 641 Pages • 81.44 MB

Evolution: A Beginner's Guide (Beginners Guide)

2005 • 216 Pages • 1.48 MB

AppleScript: A Beginner's Guide (Beginners Guide)

2009 • 449 Pages • 4.93 MB

The Leader's Guide to Lateral Thinking Skills: Powerful Problem-Solving Techniques to Ignite Your Team's Potential (Leaders Guide)

2003 • 196 Pages • 1.5 MB

The Minto Pyramid Principle: Logic in Writing, Thinking, & Problem Solving

2003 • 275 Pages • 25.99 MB

The Art of Systems Thinking - Essential Skills for Creativity and Problem Solving

2016 • 286 Pages • 15.86 MB

Systems thinking for social change : a practical guide to solving complex problems : avoiding unintended consequences, and achieving lasting results

2015 • 282 Pages • 5.88 MB

The Baha'i Faith: A Beginner's Guide (Oneworld Beginner’s Guides)

2008 • 199 Pages • 523 KB

Cloning: A Beginner's Guide (Beginners Guide (Oneworld))

2007 • 206 Pages • 2.32 MB

Paul: A Beginner's Guide (Beginners Guide (Oneworld))

2008 • 221 Pages • 820 KB

IMAGES

  1. Algorithmic Problem Solving with Python PDF

    algorithmic problem solving with python pdf

  2. DAA 1 7 Fundamentals of Algorithmic problem solving

    algorithmic problem solving with python pdf

  3. introduction to problem solving with python pdf

    algorithmic problem solving with python pdf

  4. 1.7. Review of Basic Python

    algorithmic problem solving with python pdf

  5. Algorithmic Problem Solving With Python

    algorithmic problem solving with python pdf

  6. Algorithmic Problem Solving with Python

    algorithmic problem solving with python pdf

VIDEO

  1. Практика программирования с использованием Python, Хирьянов Т. Ф., Лекция 9

  2. GE 3151 -PSPP- Algorithmic problem solving techniques

  3. Программирование на Python

  4. Python на примерах (Васильев А. Н.)

  5. Solving Problems Using input method in Python

  6. 1.5 Algorithmic Problem Solving in Tamil

COMMENTS

  1. PDF Algorithmic Problem Solving with Python

    Algorithmic Problem Solving with Python John B. Schneider Shira Lynn Broschat Jess Dahmen February 22, 2019

  2. Algorithmic Problem Solving with Python

    Title Algorithmic Problem Solving with Python ; Author(s) John B. Schneider, Shira Lynn Broschat, Jess Dahmen ; Publisher: Washington State University (February 22, 2019. Updated Continuously) License(s): Creative Commons Attribution-ShareAlike 4.0 International License; Hardcover/Paperback N/A ; eBook PDF Files and a single PDF (360 pages, 2.1 MB)

  3. PDF Data Structures and Algorithms using Python

    2. INTRODUCTION TO ALGORITHM 15 2.1 What Is an Algorithm? 15 2.2 Importance of an Algorithm 16 2.3 Different Approaches to Designing an Algorithm 16 2.4 Algorithm Design Tools: Flowchart and Pseudocode 16 2.4.1 Flowchart 17 2.4.2 Pseudocode 19 2.5 Control Structures Used in an Algorithm 20 2.6 Time and space complexity 24 2.7

  4. PDF Python Algorithms

    Python Algorithms, Second Edition, explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques. The book deals with some of the most ...

  5. Algorithmic Problem Solving with Python

    1.3 Python 1.4 Algorithmic Problem Solving 1.5 Obtaining Python 1.6 Running Python 1.6.1 Interactive Sessions and Comments 1.6.2 Running Commands from a File 1.7 Bugs 1.8 The help() Function 1.9 Comments on Learning New Languages 1.10 Chapter Summary 1.11 Review Questions Chapter 2: Core Basics. 2.1 Literals and Types

  6. PDF Problem Solving with Algorithms and Data Structures

    •To review the ideas of computer science, programming, and problem-solving. •To understand abstraction and the role it plays in the problem-solving process. •To understand and implement the notion of an abstract data type. •To review the Python programming language. 1.2Getting Started

  7. (PDF) Algorithmic Problem Solving with Python

    Download Free PDF. Algorithmic Problem Solving with Python ... Algorithmic Problem Solving with Python. Rodrigo Ramírez. See Full PDF Download PDF. See Full PDF Download PDF. Related Papers. An Entertaining Example for the Usage of Bitwise Operations in Programming. Красимир Йорджев ...

  8. Algorithmic Problem Solving With Python

    Algorithmic Problem Solving With Python - Free ebook download as PDF File (.pdf), Text File (.txt) or read book online for free. Scribd is the world's largest social reading and publishing site.

  9. Problem Solving with Algorithms and Data Structures using Python

    An interactive version of Problem Solving with Algorithms and Data Structures using Python. ... Problem Solving with Algorithms and Data Structures using Python ... What Is Algorithm Analysis? 2.3. Big-O Notation; 2.4. An Anagram Detection Example. 2.4.1. Solution 1: Checking Off;

  10. Algorithmic Problem Solving With Python

    Algorithmic Problem Solving with Python - Free download as PDF File (.pdf), Text File (.txt) or read online for free.

  11. Problem Solving with Algorithms and Data Structures using Python

    Problem Solving with Algorithms and Data Structures using Python¶. By Brad Miller and David Ranum, Luther College. Assignments; There is a wonderful collection of YouTube videos recorded by Gerry Jenkins to support all of the chapters in this text.

  12. Python Algorithms: Mastering Basic Algorithms in the Python Language

    Python Algorithms, Second Edition explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques.. The book deals with some of the most important and challenging areas of programming and ...

  13. (PDF) Python Algorithms: Mastering Basic Algorithms in the Python

    Python hands on experience over estimating shortest path and constructing minimum spanning tree over a graph. Understanding towards problem complexity and its classes. Unit VI: It provides an implementation idea over recursive algorithm, List, Stack and Queue. Understanding towards the several sorting and searching algorithm using python.

  14. Mastering Algorithms for Problem Solving in Python

    As a developer, mastering the concepts of algorithms and being proficient in implementing them is essential to improving problem-solving skills. This course aims to equip you with an in-depth understanding of algorithms and how they can be utilized for problem-solving in Python. Starting with the basics, you'll gain a foundational understanding of what algorithms are, with topics ranging from ...

  15. Python for Algorithmic Thinking: Problem-Solving Skills

    Python for Algorithmic Thinking: Problem-Solving Skills ... Download or print out as PDF to share with others. ... Dijkstra's algorithm: Python implementation

  16. Python Algorithms: Mastering Basic Algorithms in the Python ...

    Python Algorithms explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques.. The book deals with some of the most important and challenging areas of programming and computer science ...

  17. PDF Principles of Algorithmic Problem Solving

    Algorithmic problem solving is the art of formulating efficient methods that solve problems of a mathematical nature. From the many numerical algo-rithms developed by the ancient Babylonians to the founding of graph theory by Euler, algorithmic problem solving has been a popular intellectual pursuit during the last few thousand years.

  18. PDF Notes of Lesson Ge3151- Problem Solving and Python Programming

    PROBLEM SOLVING TECHNIQUES Problem solving technique is a set of techniques that helps in providing logic for solving a problem. Problem solving can be expressed in the form of 1. Algorithms. 2. Flowcharts. 3. Pseudo codes. 4. Programs 1.ALGORITHM It is defined as a sequence of instructions that describe a method for solving a problem. In other ...

  19. Dive Into Algorithms: A Pythonic Adventure for the... (PDF)

    2008 • 169 Pages • 6.18 MB. Releasing The Supernatural: An adventure into the spirit world. + adventure. 2016 • 108 Pages • 517.33 KB. Dive Into Algorithms: A Pythonic Adventure for the Intrepid Beginner - Free PDF Download - Bradford Tuckfield - 468 Pages - Year: 2021 - Python.

  20. Python Algorithms: Mastering Basic Algorithms in the Python Language

    Python Algorithms, Second Edition explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques. The book deals with some of the most ...

  21. (PDF) Algorithms Every Programmer Should Know Hone your problem-solving

    Algorithms Every Programmer Should Know Hone your problem-solving skills by learning different algorithms and their implementation in Python ... Download Free PDF. ... Algorithms Mastering Basic Algorithms in the Python Language Learn to implement classic algorithms and design new problem-solving algorithms using Python. Camilo Vargas. Download ...

  22. Computational Thinking: A Beginner's Guide to... (PDF)

    LOGICAL AND ALGORITHMIC THINKING 14 Objectives 14 Approach 14 Logical thinking 15 Algorithmic thinking 25 'Gotchas' 30 Summary 36 Exercises 37 3. PROBLEM-SOLVING AND DECOMPOSITION 39 Objectives 39 Where to start 39 Defining the problem 40 Devising a solution: Something to keep in mind 42 Decomposition 43 Other effective strategies 47 ...

  23. Algorithmic Problem Solving with Python PDF

    Download courses and tutorials Algorithmic Problem Solving with Python Language. This book uses Python to introduce folks to programming and algorithmic thinking.