kyu_6.number_zoo_patrol package
Submodules
kyu_6.number_zoo_patrol.missing_number module
Solution for -> Number Zoo Patrol.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_6.number_zoo_patrol.missing_number.find_missing_number(numbers: list) int[source]
Find missing number.
A function that takes a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n). Return this missing number.
- Parameters:
numbers – a shuffled list of unique numbers from 1 to n with one element missing
- Returns:
a missing number
kyu_6.number_zoo_patrol.test_find_missing_number module
Test for -> Number Zoo Patrol.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_6.number_zoo_patrol.test_find_missing_number.FindMissingNumberTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting ‘find_missing_number’ function.
- _classSetupFailed = False
- _class_cleanups = []
- test_find_missing_number = None
- test_find_missing_number_0(**kw)
Testing ‘find_missing_number’ function with various test data [with numbers=[2, 3, 4], expected=1].
Test a function that should take a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n). Should return this missing number. :return:
- test_find_missing_number_1(**kw)
Testing ‘find_missing_number’ function with various test data [with numbers=[1, 3, 4], expected=2].
Test a function that should take a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n). Should return this missing number. :return:
- test_find_missing_number_2(**kw)
Testing ‘find_missing_number’ function with various test data [with numbers=[1, 2, 4], expected=3].
Test a function that should take a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n). Should return this missing number. :return:
- test_find_missing_number_3(**kw)
Testing ‘find_missing_number’ function with various test data [with numbers=[1, 2, 3], expected=4].
Test a function that should take a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n). Should return this missing number. :return:
- test_find_missing_number_4(**kw)
Testing ‘find_missing_number’ function with various test data [with numbers=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, …4, 495, 496, 497, 498, 499, 500], expected=36].
Test a function that should take a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n). Should return this missing number. :return:
Module contents
Number Zoo Patrol.