kyu_6.color_choice package

Submodules

kyu_6.color_choice.checkchoose module

Solution for -> Color Choice.

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

kyu_6.color_choice.checkchoose.checkchoose(m: int, n: int) int[source]

Color Choice.

Knowing m (number of posters to design), knowing n (total number of available colors), search x (number of colors for each poster so that each poster has a unique combination of colors and the number of combinations is exactly the same as the number of posters). :param m: :param n: :return:

kyu_6.color_choice.test_checkchoose module

Test for -> Color Choice.

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

class kyu_6.color_choice.test_checkchoose.CheckchooseTestCase(methodName='runTest')[source]

Bases: TestCase

Testing checkchoose function.

_classSetupFailed = False
_class_cleanups = []
test_checkchoose = None
test_checkchoose_0(**kw)

Testing ‘checkchoose’ function with various test data [with m=6, n=4, expected=2].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_1(**kw)

Testing ‘checkchoose’ function with various test data [with m=4, n=4, expected=1].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_2(**kw)

Testing ‘checkchoose’ function with various test data [with m=4, n=2, expected=-1].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_3(**kw)

Testing ‘checkchoose’ function with various test data [with m=35, n=7, expected=3].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_4(**kw)

Testing ‘checkchoose’ function with various test data [with m=36, n=7, expected=-1].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_5(**kw)

Testing ‘checkchoose’ function with various test data [with m=1, n=6, expected=0].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_6(**kw)

Testing ‘checkchoose’ function with various test data [with m=1, n=15, expected=0].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_7(**kw)

Testing ‘checkchoose’ function with various test data [with m=2, n=12, expected=-1].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

test_checkchoose_8(**kw)

Testing ‘checkchoose’ function with various test data [with m=75788358475481302186, n=87, expected=-1].

In mathematics the number of x combinations you can take from a set of n elements is called the binomial coefficient of n and x, or more often n choose x. The formula to compute m = n choose x is: m = n! / (x! * (n - x)!) where ! is the factorial operator.

You are a renowned poster designer and painter. You are asked to provide 6 posters all having the same design each in 2 colors. Posters must all have a different color combination and you have the choice of 4 colors: red, blue, yellow, green. How many colors can you choose for each poster? :param m: :param n: :param expected: :return:

Module contents

Color Choice.