kyu_6.easy_diagonal package

Submodules

kyu_6.easy_diagonal.diagonal module

kyu_6.easy_diagonal.diagonal.diagonal(n: int, p: int) → int[source]

We want to calculate the sum of the binomial coefficients on a given diagonal. The sum on diagonal 0 is 8 (we’ll write it S(7, 0), 7 is the number of the line where we start, 0 is the number of the diagonal). In the same way S(7, 1) is 28, S(7, 2) is 56.

Parameters
  • n – n is the line where we start and

  • p – p is the number of the diagonal

Returns

the sum of the binomial coefficients on a given diagonal

kyu_6.easy_diagonal.test_diagonal module

class kyu_6.easy_diagonal.test_diagonal.EasyDiagonalTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing easy_diagonal function

test_easy_diagonal()[source]

Testing easy_diagonal function :param self: :return:

Module contents