Light Mode
Dark Mode
Extra: Test 3 Row Index out of bounds

I would like to give some feedback about ...

From: http://www.checkio.org/mission/count-neighbours/solve/

On Test 3 of the Extra tests

IndexError: tuple index out of range, count_neighbours, 17

сount_neighbours( ((1,0,1,0,1), (0,1,0,1,0), (1,0,1,0,1), (0,1,0,1,0), (1,0,1,0,1), (0,1,0,1,0),), 5, 4)

the Row index defined in the test is out of bounds. Tuple index from zero, so the real question should have a number no larger than 4 in the count_neighbors(grid, row, col) row and col for a 5x5 grid. All previous problems/tests/asserts index from zero. Can't have it both ways

  • feedback
Created: Oct. 7, 2015, 7:40 p.m.
Updated: Oct. 30, 2015, 5:23 p.m.
0
7
User avatar
mr.samuel.hart