[Tutor] my pet project (long)

Paul Hartley p.hartley@spitech.com
Wed, 30 Jan 2002 11:39:46 +0800


On 29-Jan-2002 Andrzej Kolinski wrote:
>
> I am a total newbie surrounded by Python books and tutorials. Before I
> became the one (this was not difficult :-)) I tried to learn a bit of C (I
> am glad I did not). I found Python and this mailing are the best things
for
> what I dream to do.
>
> This is my pet project. I would like to write a python program that allows
> me to maintain  players' ranking for our bridge club. I run weekly
> duplicate games and use a designated program to score these games. Among
> other things it creates text files (see examples attached) with the game
> results. I want to use the players' Pct (second column) and Names (last
> column) to do my calculations.
>
> The first things I want to know is:
> -    how to get the data from the results file, i.e. how to create a
> table/file with each player's name associated with the pair's Pct (what
> type of file/string operation applies)?
> -    how to use this individual player result to update the ranking
> table/file? This would take:
>      -    player's current ranking (first entry = 50.00),
>      -    partner's current ranking,
>      -    last game Pct for this pair, and maybe
>      -    the average ranking of all players in the game.
>
> I want to include the last 8 games in these calculations and produce a
> current club ranking list for players that participated at least in 4 out
> of the last 8 games.
>
> I've gone through several tutorials, concentrating especially on file
> operations/string manipulations but I do not know where to start and I
> would appreciate any advice from you.
>
> By the way, are there any duplicate bridge players on this mailing list
> *grin*?
>
Sean Perry is right, this is a large task for a beginner, and you should
break it down into smaller tasks.

I am a duplicate bridge player and an experienced programmer, but fairly new
to Python - so perhaps we can work together to help me extend my python
experience and for you to understand more about programming.

The help available at this python tutor mailing lst is excellent - so there
should be no problem getting further help when needed.