[Tutor] self-learning Python
bhaaluu at gmail.com
Sun Mar 9 15:30:16 CET 2008
On Sun, Mar 9, 2008 at 8:54 AM, Kent Johnson <kent37 at tds.net> wrote:
> > On Sun, Mar 9, 2008 at 8:16 AM, Julia <midnightjulia at gmail.com wrote:
> > To be honest I truly dislike the Dawson book. I wouldn't recommend
> > it to anyone. It's lacks technical clarity, examples and has a messy
> > index. I'm going to sell my example asap.
> I'm not sure what kind of clarity you want. To be sure Dawson is not
> nearly as precise and comprehensive as Learning Python, for example, but
> I think the more casual approach is better for a complete beginner.
> ISTM Dawson is written almost entirely as a series of extended examples,
> I'm really surprised that you say it lacks examples.
I found Dawson's book very approachable for people who are Absolute
Beginners to programming. As Kent says, each chapter is a series of
extended examples that cover fundamental concepts. The premise of
the book is that Game Programming is a FUN way to learn programming.
Most of the book uses text-based games as examples. Each chapter
ends with a set of Challenges that encourage you to test the skills you've
learned up to that point. The Challenges are appropriate for Absolute
Beginners (ie. none of them ask you to do anything that hasn't been
taught yet). Most of the Challenges require a little thought to complete.
Some of the Challenges ask that you modify an example in the chapter
to make it do something different, or to add a new feature.
Chapter 1 starts out with the "Game Over Program" which is the equivalent
of the "Hello, world!" program in most other books. This chapter talks you
through getting Python setup and running on your computer, and all sorts
of other essential beginning steps that need to be done in order to use
Python as your programming language.
Chapter 2 uses "The Useless Trivia Program" to cover Types, Variables, and
Chapter 3 covers Branching (making decisions), 'while' loops, and program
planning. The "Guess My Number Game" is used as the main example. All
the examples build up to writing the Guessing game.
Chapter 4 has "The Word Jumble Game". It covers 'for' loops, Strings, Slicing
Strings, and Tuples.
Chapter 5 introduces Lists and Dictionaries. Here is "The Hangman Game".
Chapter 6 covers functions, and "The Tic-Tac-Toe Game".
Chapter 7 has "The Trivia Challenge Game" and covers Files and Exceptions.
Chapter 8 begins the Object Oriented Programming (classes, methods, etc.)
and has "The Critter Caretaker Program" (a Tamagotchi-type game).
Chapter 9 continues the Object Oriented Programming with "The Blackjack
Game". Inheritance, Polymorphism, and other OOP concepts are introduced.
Chapter 10 starts to get into GUI development with Tkinter. "The Mad Lib
Program" is the main game.
The Final two chapters use a modified version of the LiveWires package to
run the games. You'll need to have PyGame and LiveWires installed for these
games to work. LiveWires is a "wrapper" for PyGame which supposedly makes
PyGame easier to lear and use. PyGame is a "wrapper" for the SDL library,
written in the C programming language.
Chapter 11 gets into Graphics, and the examples build up to "The Pizza Panic
Game". Backgrounds, Sprites, Collisions, and other basic graphic gaming
concepts are covered here.
Chapter 12 is a full-blown graphic 2-D arcade-style game called "The Astrocrash
Game" (similar to 'Asteroids'). Sound, Animation, and Program Development
Appendix A is a LiveWires reference.
Games are a really fun way to learn programming, and Dawson's book makes
learning programming a lot of fun! I think the book is meant to be read from
cover to cover, since each chapter is built on the concepts introduced in
previous chapters. Everything is explained clearly without the use of confusing
'jargon'. Terminology is clearly explained, and examples are explained
If you can finish Dawson's book, you'll be well prepared to take on just about
any other Python tutorial out there (except maybe the ones that delve into
advanced Computer Science theory).
> > When I started learning Python, I had had no programming background
> > whatsoever. It was Michael Dawson's book that got me off the ground. I
> > then read another book "Python programming: an introduction to computer
> > science", and things began to make sense to me.
> I almost mentioned that one too. Python for Dummies might also be a good
> choice but I haven't seen that.
> O'Reilly is coming out with a book Head First Programming that uses
> Python but it isn't scheduled to be published until May.
> Tutor maillist - Tutor at python.org
If you finish Dawson's book and are interested in continuing with
Python/PyGame programming (without LiveWires) then you might
want to look into obtaining a copy of Andy Harris' book: Game Programming
published by Wiley (2007). It covers 2-D arcade games with PyGame, and
is a good PyGame tutorial.
Another PyGame programing book is: Beginning Game Development with
Python and Pygame: From Novice to Professional, by Will McGugan. I haven't
seen this book yet, but it covers 3-D game programming.
b h a a l u u at g m a i l dot c o m
"You assist an evil system most effectively by obeying its
orders and decrees. An evil system never deserves such
allegiance. Allegiance to it means partaking of the evil.
A good person will resist an evil system with his or her
whole soul." [Mahatma Gandhi]
More information about the Tutor