Skip to main content
  • Textbook
  • © 2014

The Python Workbook

A Brief Introduction with Exercises and Solutions

Authors:

  • Presents numerous exercises, many of which with complete solutions
  • Supports the solutions with additional notes that explain the technique used and highlight specific points of Python syntax
  • Includes a mixture of classic computer science exercises and exercises that make connections to other disciplines
  • Includes supplementary material: sn.pub/extras

Buy it now

Buying options

eBook USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 49.99
Price excludes VAT (USA)
  • 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

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

Table of contents (16 chapters)

  1. Front Matter

    Pages i-xvi
  2. Exercises

    1. Front Matter

      Pages 1-1
    2. Introduction to Programming Exercises

      • Ben Stephenson
      Pages 3-13
    3. If Statement Exercises

      • Ben Stephenson
      Pages 15-27
    4. Loop Exercises

      • Ben Stephenson
      Pages 29-38
    5. Function Exercises

      • Ben Stephenson
      Pages 39-47
    6. List Exercises

      • Ben Stephenson
      Pages 49-60
    7. Dictionary Exercises

      • Ben Stephenson
      Pages 61-67
    8. File and Exception Exercises

      • Ben Stephenson
      Pages 69-78
    9. Recursion Exercises

      • Ben Stephenson
      Pages 79-84
  3. Solutions

    1. Front Matter

      Pages 85-85
    2. Introduction to Programming Solutions

      • Ben Stephenson
      Pages 87-95
    3. If Statement Solutions

      • Ben Stephenson
      Pages 97-106
    4. Loop Solutions

      • Ben Stephenson
      Pages 107-113
    5. Function Solutions

      • Ben Stephenson
      Pages 115-126
    6. List Solutions

      • Ben Stephenson
      Pages 127-137
    7. Dictionary Solutions

      • Ben Stephenson
      Pages 139-144
    8. File and Exception Solutions

      • Ben Stephenson
      Pages 145-155
    9. Recursion Solutions

      • Ben Stephenson
      Pages 157-161
  4. Back Matter

    Pages 163-165

About this book

While other textbooks devote their pages to explaining introductory programming concepts, The Python Workbook focuses exclusively on exercises, following the philosophy that computer programming is a skill best learned through experience and practice. Designed to support and encourage hands-on learning about programming, this student-friendly work contains 174 exercises, spanning a variety of academic disciplines and everyday situations. Solutions to selected exercises are also provided, supported by brief annotations that explain the technique used to solve the problem, or highlight specific points of Python syntax. No background knowledge is required to solve the exercises, beyond the material covered in a typical introductory Python programming course. 

Undergraduate students undergoing their first programming course and wishing to enhance their programming abilities will find the exercises and solutions provided in this book to be ideal for their needs.

Reviews

“The book is suitable for a gentle introductory college level course, or even a solid high school intro to programming course. … A book like this one might in fact be ideal for someone aiming to learn programming or Python on his own. It can also be a very good supplementary material for an online course … . The book is a great resource for acquiring the basic coding fluency … .” (Bojan Tunguz, tunguzreview.com, February, 2015)

“The book provides you with 174 exercises, which can make you an advanced beginner … in Python. The excersises are well-structured indeed, taking into account anything from the basics of the language (printing, units, conditionals, loops and functions) to some more advanced structures as dictionaries, lists and working with files. … The excersises are well selected indeed. I liked them and I enjoyed solving (or looking at their solutions) them.” (Vitosh Academy, vitoshacademy.com, February, 2015)


Authors and Affiliations

  • University of Calgary, Canada

    Ben Stephenson

About the author

Dr. Ben Stephenson is a Senior Instructor in the Department of Computer Science at the University of Calgary, AB, Canada.

Bibliographic Information

  • Book Title: The Python Workbook

  • Book Subtitle: A Brief Introduction with Exercises and Solutions

  • Authors: Ben Stephenson

  • DOI: https://doi.org/10.1007/978-3-319-14240-1

  • Publisher: Springer Cham

  • eBook Packages: Computer Science, Computer Science (R0)

  • Copyright Information: Springer Nature Switzerland AG 2014

  • Softcover ISBN: 978-3-319-38561-7Published: 06 October 2016

  • eBook ISBN: 978-3-319-14240-1Published: 22 January 2015

  • Edition Number: 1

  • Number of Pages: XVI, 165

  • Number of Illustrations: 1 b/w illustrations, 86 illustrations in colour

  • Topics: Programming Languages, Compilers, Interpreters, Python, Computational Intelligence

Buy it now

Buying options

eBook USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 49.99
Price excludes VAT (USA)
  • 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