kyu_6.row_of_the_odd_triangle package

Submodules

kyu_6.row_of_the_odd_triangle.odd_row module

kyu_6.row_of_the_odd_triangle.odd_row.calc_first_number(n: int) → int[source]

Calculate first number in the row :param n: :return:

kyu_6.row_of_the_odd_triangle.odd_row.calc_last_number(n: int) → int[source]

Calculate last number in the row :param n: :return:

kyu_6.row_of_the_odd_triangle.odd_row.odd_row(n: int) → list[source]

Given a triangle of consecutive odd numbers finds the triangle’s row knowing its index (the rows are 1-indexed). :param n: :return:

kyu_6.row_of_the_odd_triangle.test_odd_row module

class kyu_6.row_of_the_odd_triangle.test_odd_row.OddRowTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing odd_row function

test_odd_row()[source]

Module contents