kyu_8.counting_sheep package

Submodules

kyu_8.counting_sheep.counting_sheep module

Solution for -> Counting sheep…

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_8.counting_sheep.counting_sheep.count_sheep(array_of_sheep: list) int[source]

Count sheep.

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).

Hint: Don’t forget to check for bad values like null/undefined :param array_of_sheep: list :return: int

kyu_8.counting_sheep.test_counting_sheep module

Test for -> Counting sheep…

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_8.counting_sheep.test_counting_sheep.CountingSheepTestCase(methodName='runTest')[source]

Bases: TestCase

Testing ‘count_sheep’ function.

_classSetupFailed = False
_class_cleanups = []
test_counting_sheep()[source]

Testing ‘count_sheep’ function.

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). :return:

test_counting_sheep_bad_input()[source]

Testing ‘count_sheep’ function, invalid values.

Hint: Don’t forget to check for bad values like null/undefined :return:

test_counting_sheep_empty_list()[source]

Testing ‘count_sheep’ function, empty list.

Hint: Don’t forget to check for bad values like empty list :return:

test_counting_sheep_mixed_list()[source]

Testing ‘count_sheep’ function, null value.

Hint: Don’t forget to check for bad values like mixed list :return:

Module contents

Counting sheep.