kyu_6.sort_the_odd package

Submodules

kyu_6.sort_the_odd.solution module

kyu_6.sort_the_odd.solution.sort_array(source_array: list) → list[source]

Sorting ascending odd numbers but even numbers must be on their places.

Zero isn’t an odd number and you don’t need to move it. If you have an empty array, ou need to return it.

Parameters

source_array

Returns

kyu_6.sort_the_odd.test_sort_array module

class kyu_6.sort_the_odd.test_sort_array.SortArrayTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing ‘sort_array’ function

test_sort_array()[source]

The ‘sort_array’ function.

The task is to sort ascending odd numbers but even numbers must be on their places.

Zero isn’t an odd number and you don’t need to move it. If you have an empty array, you need to return it.

Returns

Module contents