Untitled
unknown
plain_text
a year ago
425 B
7
Indexable
TeamName = ["TEAM A", "TEAM B", "TEAM C", "TEAM D"] TeamPoints = [[3,2,1],[0,3,1],[1,1,2],[2,0,2]] LeagueSize = len(TeamName) MatchNo = len(TeamPoints[0]) TotalPoints = [0 for i in range(LeagueSize)] TeamCounter = 0 for TeamCounter in range(0,LeagueSize): for MatchCounter in range (0,MatchNo): MatchScore = TeamPoints[TeamCounter][MatchCounter] TotalPoints[TeamCounter] += MatchScore print(TotalPoints)
Editor is loading...
Leave a Comment