Link to home
Start Free TrialLog in
Avatar of Dushan Silva
Dushan SilvaFlag for Australia

asked on

URGENT: find smallest difference (either PHP, Java or Python)

Hi Experts,
Could you please help me to resolve following problem.
----------------------------------------------------------------------------------------------------------------
The file football.txt contains the results from the English Premier League for 2001/2. The columns labeled ‘F’ and ‘A’ contain the total number of goals scored for and against each team in that season (so Arsenal scored 79 goals against opponents, and had 36 goals scored against them). Need a java program to print the name of the team with the smallest difference in ‘for’ and ‘against’ goals.
----------------------------------------------------------------------------------------------------------------
football.txt
Avatar of Dushan Silva
Dushan Silva
Flag of Australia image

ASKER

My main objective of this question is to identify the activities we will be able to write the code and demonstrate some of the practices and techniques that we would use in best practices under industry. I'm mainly be looking for the thought process and how we can complete this task. But points goes to the first/best post.

Thanks a lot Experts.
SOLUTION
Avatar of Garry Glendown
Garry Glendown
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot Garry-G, lwadwell and Ray for your great example codes.

Hi Ray,
I'm getting following for the given code.
--------------------------------------------------------------------------------------------------------------
Notice:  Undefined offset:  1 in C:\AppServ\www\dush\2.php on line 55
--------------------------------------------------------------------------------------------------------------
Maybe you are not using the test data set that was posted here?  Please see line 44 for the URL of the file I relied on when writing the code.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot all!!