Created
February 21, 2019 16:17
-
-
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).
This file contains hidden or 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
| 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