Archive for August 2009

Project Euler problem 54

29 August 2009

I’m starting on Project Euler to help myself learn Python better.  Project Euler offers a great range of problems that sit in the realm between math and programming.  I finally solved problem 54 tonight, which involves judging poker hands.  A couple of observations that helped me finish the problem were:

  1. Breaking ties between hands of the same value only sometimes requires high card evaluation.   E.g. when comparing four of a kind, three of a kind, or full house, there is no need to check any other cards besides the melded cards.
  2. Royal flush and Straight flush require the same evaluation.PythonEssentialReference

After looking at a lot of Python books and wishing for something up to date, I found Python: Essential Reference fourth edition by Beazley.  It has good coverage of both 2.6 and 3.0, and the author comes from a scientific background as well.

Advertisements

The White Tiger

24 August 2009

TheWhiteTigerI love that I can reserve books online from our library.  It makes getting a hold of new and popular books very easy – they even robo-call you when the book is waiting for you.   Read The White Tiger almost without stopping – felt like I was rising and falling at the same time.