kyu_7.easy_line package

Submodules

kyu_7.easy_line.easyline module

kyu_7.easy_line.easyline.calc_combination_per_row_item(row: int, i: int) → int[source]

Generates a specific combination from Pascal’s Triangle row by specified index :param row: row :param i: index :return:

kyu_7.easy_line.easyline.easy_line(n: int) → int[source]

The function will take n (with: n>= 0) as parameter and will return the sum of the squares of the binomial coefficients on line n.

Parameters

n – the line number (with: n>= 0)

Returns

kyu_7.easy_line.test_easyline module

class kyu_7.easy_line.test_easyline.EasyLineTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

We want to calculate the sum of the squares of the binomial coefficients on a given line with a function called easyline (or easyLine or easy-line).

Can you write a program which calculate easyline(n) where n is the line number?

The function will take n (with: n>= 0) as parameter and will return the sum of the squares of the binomial coefficients on line n.

test_calc_combinations_per_row()[source]
test_easy_line()[source]
test_easy_line_exception()[source]

Module contents