I have attached a sample Scores file from a HR Derby app (qaz.txt). it is an ASCII text file.
I am attempting to write a python program to read this data file (by prompting the user for filename),
and tallying a W-L, Pct., record for both players, and what the longest winning
streak was for each player. The output should look like these next 2 lines:
Mincher 49-50 .495 Longest winning streak 10
Prescott 50-49 .505 Longest winning streak 7
(Player names will vary with each new file read)
The number of games played is listed on line 2 of
the data file (in this case 99), and any data past the line that reads "SERIES STATS"
is to be ignored. I have attached the data file (qaz.txt) and the python code
that I cannot get to work (derby_read.py)
Any HELP would be appreciated
I am attempting to write a python program to read this data file (by prompting the user for filename),
and tallying a W-L, Pct., record for both players, and what the longest winning
streak was for each player. The output should look like these next 2 lines:
Mincher 49-50 .495 Longest winning streak 10
Prescott 50-49 .505 Longest winning streak 7
(Player names will vary with each new file read)
The number of games played is listed on line 2 of
the data file (in this case 99), and any data past the line that reads "SERIES STATS"
is to be ignored. I have attached the data file (qaz.txt) and the python code
that I cannot get to work (derby_read.py)
Any HELP would be appreciated
Attached Files