ex 11

credit to http://learnpythonthehardway.org/