kyu_8.count_the_monkeys package
Submodules
kyu_8.count_the_monkeys.monkey_count module
Solution for -> Count the Monkeys!.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_8.count_the_monkeys.monkey_count.monkey_count(n: int) list[source]
Count monkeys.
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :param n: int :return: list
kyu_8.count_the_monkeys.test_monkey_count module
Test for -> Count the Monkeys!.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_8.count_the_monkeys.test_monkey_count.MonkeyCountTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting monkey_count function.
- _classSetupFailed = False
- _class_cleanups = []
- test_monkey_count = None
- test_monkey_count_0(**kw)
Testing monkey_count function [with n=1, expected=[1]].
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :return:
- test_monkey_count_1(**kw)
Testing monkey_count function [with n=5, expected=[1, 2, 3, 4, 5]].
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :return:
- test_monkey_count_2(**kw)
Testing monkey_count function [with n=3, expected=[1, 2, 3]].
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :return:
- test_monkey_count_3(**kw)
Testing monkey_count function [with n=9, expected=[1, 2, 3, 4, 5, 6, 7, 8, 9]].
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :return:
- test_monkey_count_4(**kw)
Testing monkey_count function [with n=10, expected=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]].
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :return:
- test_monkey_count_5(**kw)
Testing monkey_count function [with n=20, expected=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, … 13, 14, 15, 16, 17, 18, 19, 20]].
You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.
As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero. :return:
Module contents
Count the Monkeys.