Skip to content

Instantly share code, notes, and snippets.

@venelrene
Created February 21, 2019 16:17
Show Gist options
  • Select an option

  • Save venelrene/283ca4a3a1261bb37ba2b14d171bed09 to your computer and use it in GitHub Desktop.

Select an option

Save venelrene/283ca4a3a1261bb37ba2b14d171bed09 to your computer and use it in GitHub Desktop.
Consider an array of sheep where some sheep may be missing from their place. We need a function that counts the number of sheep present in the array (true means present).
def count_sheeps(arrayOfSheeps):
return arrayOfSheeps.count(True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment