Skip to content

Instantly share code, notes, and snippets.

@guilleiguaran
Created June 2, 2014 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilleiguaran/0a75fcf5af2af8dd9a92 to your computer and use it in GitHub Desktop.
Save guilleiguaran/0a75fcf5af2af8dd9a92 to your computer and use it in GitHub Desktop.
let individualScores = [75, 43, 103, 87, 12]
var teamScore = 0
for score in individualScores {
if score > 50 {
teamScore += 3
} else {
teamScore += 1
}
}
teamScore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment