The kata description asks what the last number Jason says, but doesn't say what numbers he says rather than calculates. start - what number Jason starts counting from implies that he says the first number, but there is no mention of saying other numbers, only calculating them.
In your Description you state 2 seconds if subtracts N from a one-digit number (if 1 <= start <= 9). In order to pass the tests in your kata however, 0 is also treated as a one-digit number. For that reason, your description should be changed to 2 seconds if subtracts N from a one-digit number (if 0 <= start <= 9)
Negative cases should also be provided as example tests
The ref solution doesn't handle all the cases generated in the random tests:
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 90, in test_group1
test.assert_equals(chess(res1), mine_solution(res1))
^^^^^^^^^^^^^^^^^^^
File "/workspace/default/tests.py", line 6, in mine_solution
.... <= int(s[1]) <= 8 ...
^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'X'
Random Tests do not produce the condition where an underscore is folowed by an uppercase letter. This hacky solution takes advantage of the fact that this condition is only tested once as a fixed test.
C# Translation
The kata description asks what the last number Jason says, but doesn't say what numbers he says rather than calculates.
start - what number Jason starts counting from
implies that he says the first number, but there is no mention of saying other numbers, only calculating them.In your Description you state
2 seconds if subtracts N from a one-digit number (if 1 <= start <= 9)
. In order to pass the tests in your kata however, 0 is also treated as a one-digit number. For that reason, your description should be changed to2 seconds if subtracts N from a one-digit number (if 0 <= start <= 9)
Negative cases should also be provided as example tests
Cheers
Hi,
The ref solution doesn't handle all the cases generated in the random tests:
Random Tests do not produce the condition where an underscore is folowed by an uppercase letter. This hacky solution takes advantage of the fact that this condition is only tested once as a fixed test.
errr, no you did not fix the solution setup, ie the starting code for the user. it's still: