-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
WAB2014
authored and
WAB2014
committed
Jul 31, 2014
1 parent
7b03b8e
commit 12a72a3
Showing
18 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,42 @@ | ||
import csv | ||
|
||
teamname = 'Tottenham' | ||
goals = 0 | ||
wins = 0 | ||
losses = 0 | ||
draws = 0 | ||
with open('footieINFO.csv', 'r') as file: | ||
reader = csv.reader(file) | ||
i = 0 | ||
i=0 | ||
for row in reader: | ||
print(', '.join(row[1:7])) | ||
if i == 5: | ||
break | ||
if row[2] == teamname: #games played by team at home | ||
goals = goals + int(row[4]) #goals | ||
print(', '.join(row[1:7])) | ||
if int(row[4]) > int(row[5]): #home goals greater than away goals | ||
wins = wins + 1 #wins | ||
elif int (row[4]) < int(row[5]):#away goals greater than away goals | ||
losses = losses +1 #losses | ||
else: | ||
draws = draws +1 #draws | ||
|
||
if row[3] == teamname: #games played by team away | ||
goals = goals + int(row[5]) #goals | ||
print(', '.join(row[1:7])) | ||
if int(row[5]) > int(row[4]): #home goals greater than away goals | ||
wins = wins + 1 #wins | ||
elif int (row[5]) < int(row[4]):#away goals greater than away goals | ||
losses = losses +1 #losses | ||
else: | ||
draws = draws +1 #draws | ||
#if i == 5: | ||
# break | ||
i += 1 | ||
|
||
print('Goals by '+teamname+': '+str(goals)) | ||
print('Wins: '+str(wins)) | ||
print('Losses: '+str(losses)) | ||
print('Draws: '+str(draws)) | ||
print(teamname+','+str(goals)+','+str(wins)+','+str(losses)+','+str(draws)) | ||
statsfile = open('/Users/William03/GitHub/penalty-game-project/statsfile.csv','a') | ||
statsfile.write('\n'+teamname+','+str(goals)+','+str(wins)+','+str(losses)+','+str(draws)) | ||
statsfile.close() |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<array> | ||
<string>csv</string> | ||
<string>M3.2-1861-1</string> | ||
</array> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
539A06AC-75F6-43DE-98F2-0F7A4E40657D |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
Arsenal,68,24,7,7 | ||
Chelsea,71,25,6,7 | ||
Manchester United,0,0,0,0 | ||
Man United,64,19,12,7 | ||
Man City,102,27,6,5 | ||
Aston Villa,39,10,20,8 | ||
Liverpool,101,26,6,6 | ||
Stoke,45,13,14,11 | ||
Norwich,28,8,21,9 | ||
Everton,61,21,8,9 | ||
Sunderland,41,10,20,8 | ||
Fulham,40,9,24,5 | ||
Swansea,54,11,18,9 | ||
West Brom,43,7,16,15 | ||
Southamton,0,0,0,0 | ||
West Ham,40,11,20,7 | ||
Southampton,54,15,12,11 | ||
Cardiff,32,7,22,9 | ||
Cardiff,32,7,22,9 | ||
Hull,38,10,21,7 | ||
Hull,38,10,21,7 | ||
Crystal Palace,33,13,19,6 | ||
Tottenham,55,21,11,6 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<array> | ||
<string>csv</string> | ||
<string>M3.2-1861-1</string> | ||
</array> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0909E6DC-DBC4-4EFD-BEDE-CB88FC7CFC3F |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 | ||
{\fonttbl} | ||
{\colortbl;\red255\green255\blue255;} | ||
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 | ||
} |