Exercises

Here are some exercises for you to try on your own. Solutions are available at http://pragprog.com/titles/gwpy3/practical-programming.

  1. In this exercise, you will create a table to store the population and land area of the Canadian provinces and territories according to the 2001 census. Our data is taken from http://www12.statcan.ca/english/census01/home/index.cfm.

    Table 34. 2001 Canadian Census Data

    Province/Territory

    Population

    Land Area

    Newfoundland and Labrador

    512930

    370501.69

    Prince Edward Island

    135294

    5684.39

    Nova Scotia

    908007

    52917.43

    New Brunswick

    729498

    71355.67

    Quebec

    7237479

    1357743.08

    Ontario

    11410046

    907655.59

    Manitoba

    1119583

    551937.87

    Saskatchewan ...

Get Practical Programming, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.