small medium large xlarge

Practical Programming: An Introduction to Computer Science Using Python


Cover image for Practical Programming

Practical Programming

An Introduction to Computer Science Using Python


Welcome to computer science in the 21st century. Did you ever wonder how computers represent DNA? How they can download a web page containing population data and analyze it to spot trends? Or how they can change the colors in a color photograph? If so, this book is for you. By the time you’re done, you’ll know how to do all of that and a lot more. And Python makes it easy and fun. This edition uses Python 2.

Practical Programming using Python 3 (2nd Edition) is available here.

*If you require the Python 2 version, then place an order for the 2nd edition (link above) and contact for a courtesy link to the 1st edition eBook as long as we have it available.

About this Title

Pages: 346
Published: 2009-04-01
Release: P4.0 (2011-10-14)
ISBN: 978-1-93435-627-2

Computers are used in every part of science from ecology to particle physics. This introduction to computer science continually reinforces those ties by using real-world science problems as examples. Anyone who has taken a high school science class will be able to follow along as the book introduces the basics of programming, then goes on to show readers how to work with databases, download data from the web automatically, build graphical interfaces, and most importantly, how to think like a professional programmer.

Topics covered include:

  • Basic elements of programming from arithmetic to loops and if statements.
  • Using functions and modules to organize programs.
  • Using lists, sets, and dictionaries to organize data.
  • Designing algorithms systematically.
  • Debugging things when they go wrong.
  • Creating and querying databases.
  • Building graphical interfaces to make programs easier to use.
  • Object-oriented programming and programming patterns.

Answers to selected exercises are available online at

Contents & Extracts

Full Table of Contents

  • Introduction
  • Hello, Python excerpt
  • Strings
  • Modules excerpt
  • Lists excerpt
  • Making Choices
  • Repetition
  • File Processing
  • Sets and Dictionaries
  • Algorithms
  • Searching and Sorting
  • Construction
  • Object-Oriented Programming
  • Graphical User Interfaces
  • Databases


Jennifer Campbell is a senior lecturer in Computer Science at the
University of Toronto who created the course this book is based on.
Paul Gries, also a senior lecturer, has won numerous teaching awards
and authored other introductory computer science texts. Jason Montojo
was a student of theirs who has since worked on the Eclipse
programming platform at IBM; he is also a professional photographer
and digital artist, and created all of the diagrams for this book.
Greg Wilson worked in industry for many years before returning to
academia; he has been using Python for over a decade, and has written
several other programming books.