kyu_8.grasshopper_summation package

Submodules

kyu_8.grasshopper_summation.summation module

Solution for -> Grasshopper - Summation.

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

kyu_8.grasshopper_summation.summation.summation(num: int) int[source]

Find the summation of every number from 1 to num.

The number will always be a positive integer greater than 0. :param num: int :return: int

kyu_8.grasshopper_summation.test_summation module

Test for -> Grasshopper - Summation.

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

class kyu_8.grasshopper_summation.test_summation.SummationTestCase(methodName='runTest')[source]

Bases: TestCase

Testing summation function.

_classSetupFailed = False
_class_cleanups = []
test_summation = None
test_summation_0(**kw)

Testing summation function with various test inputs [with num=1, expected=1].

Returns:

test_summation_1(**kw)

Testing summation function with various test inputs [with num=8, expected=36].

Returns:

test_summation_2(**kw)

Testing summation function with various test inputs [with num=22, expected=253].

Returns:

test_summation_3(**kw)

Testing summation function with various test inputs [with num=100, expected=5050].

Returns:

test_summation_4(**kw)

Testing summation function with various test inputs [with num=213, expected=22791].

Returns:

Module contents

Grasshopper - Summation.