Introduction to Programming in Python: An Interdisciplinary Approach, 1st edition

Published by Addison Wesley (July 6, 2021) © 2015

  • Robert Sedgewick
  • Kevin Wayne
  • Robert Dondero

Pearson+ subscription

ISBN-13: 9780137459629
Introduction to Programming in Python: An Interdisciplinary Approach
Published 2021

eTextbook rental includes

  • Instant access to eTextbook
  • Search, highlight, and notes
  • Create flashcards

Introduction to Programming in Python: An Interdisciplinary Approach emphasizes interesting and important problems, not toy applications. The authors focus on Python's most useful and significant features, rather than aiming for exhaustive coverage that bores novices. All of this book's code has been crafted and tested for compatibility with both Python 2 and Python 3, making it relevant to every programmer and any course, now and for many years to come.


An extensive amount of supplementary information is available at introcs.cs.princeton.edu/python. With source code, I/O libraries, solutions to selected exercises, and much more, this companion website empowers people to use their own computers to teach and learn the material.

Preface xiii

 

Chapter 1: Elements of Programming 1

1.1 Your First Program 2

1.2 Built-in Types of Data 14

1.3 Conditionals and Loops 56

1.4 Arrays 100

1.5 Input and Output 140

1.6 Case Study: Random Web Surfer 188

 

Chapter 2: Functions and Modules 209

2.1 Defining Functions 210

2.2 Modules and Clients 248

2.3 Recursion 290

2.4 Case Study: Percolation 322

 

Chapter 3: Object-Oriented Programming 351

3.1 Using Data Types 352

3.2 Creating Data Types 402

3.3 Designing Data Types 450

3.4 Case Study: N-Body Simulation 496

 

Chapter 4: Algorithms and Data Structures 511

4.1 Performance 512

4.2 Sorting and Searching 556

4.3 Stacks and Queues 590

4.4 Symbol Tables 634

4.5 Case Study: Small-World Phenomenon 684

 

Context 729

 

Glossary 733

Index 739

 

Each section concludes with Q&A and Exercises.

Need help? Get in touch