kyu_8.grasshopper_check_for_factor package

Submodules

kyu_8.grasshopper_check_for_factor.check_for_factor module

Solution for -> Grasshopper - Check for factor.

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

kyu_8.grasshopper_check_for_factor.check_for_factor.check_for_factor(base: int, factor: int) bool[source]

Check if the factor is a factor of base.

Factors are numbers you can multiply together to get another number.

Return true if it is a factor or false if it is not. :param base: int :param factor: int :return: bool

kyu_8.grasshopper_check_for_factor.test_check_for_factor module

Test for -> Grasshopper - Check for factor.

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

class kyu_8.grasshopper_check_for_factor.test_check_for_factor.CheckForFactorTestCase(methodName='runTest')[source]

Bases: TestCase

Testing check_for_factor function.

_classSetupFailed = False
_class_cleanups = []
test_check_for_factor_false = None
test_check_for_factor_false_0(**kw)

Testing check_for_factor function [with base=9, factor=2, expected=False].

This function should test if the factor is a factor of base.

Return false if it is not a factor. :return:

test_check_for_factor_false_1(**kw)

Testing check_for_factor function [with base=653, factor=7, expected=False].

This function should test if the factor is a factor of base.

Return false if it is not a factor. :return:

test_check_for_factor_false_2(**kw)

Testing check_for_factor function [with base=2453, factor=5, expected=False].

This function should test if the factor is a factor of base.

Return false if it is not a factor. :return:

test_check_for_factor_false_3(**kw)

Testing check_for_factor function [with base=24617, factor=3, expected=False].

This function should test if the factor is a factor of base.

Return false if it is not a factor. :return:

test_check_for_factor_true = None
test_check_for_factor_true_0(**kw)

Testing check_for_factor function [with base=10, factor=2, expected=True].

This function should test if the factor is a factor of base.

Return true if it is a factor. :return:

test_check_for_factor_true_1(**kw)

Testing check_for_factor function [with base=63, factor=7, expected=True].

This function should test if the factor is a factor of base.

Return true if it is a factor. :return:

test_check_for_factor_true_2(**kw)

Testing check_for_factor function [with base=2450, factor=5, expected=True].

This function should test if the factor is a factor of base.

Return true if it is a factor. :return:

test_check_for_factor_true_3(**kw)

Testing check_for_factor function [with base=24612, factor=3, expected=True].

This function should test if the factor is a factor of base.

Return true if it is a factor. :return:

Module contents

Grasshopper.