number = 21
for TEST in range(0, 3):
test.expect(makeMove(number) in range(1, 4), 'Did not return a number between 1 and 3')
number -= makeMove(number)
This test makes no sense, as it means the same player taking 3 turns in a row.
Very disappointed with this kata, at first it was unclear what i suppose to do. Than, when i got it and passed all the tests, this annoying [TypeError: unsupportd operand type(s) for -=: 'int' and 'str'".] appeared out of nowhere, and i can't resolve it, but i have to, to get a course certificate in my school!
Great Kata!
The function name should be in snake_case in Python.
Inside tests:
Inside
myMove
function:These leads to
TypeError: unsupportd operand type(s) for -=: 'int' and 'str'
being raised if the user's algorithm is incorrect.Okay, I take that back. Turns out the tests are even worse than I thought at first.
But, this changes nothing. You receive this error, because reference function returns
"Computer won!"
, so your algorithm is still incorrect.But its not, it returns int
Your code is wrong, and returns a string instead of a number.
This test makes no sense, as it means the same player taking 3 turns in a row.
Very disappointed with this kata, at first it was unclear what i suppose to do. Than, when i got it and passed all the tests, this annoying [TypeError: unsupportd operand type(s) for -=: 'int' and 'str'".] appeared out of nowhere, and i can't resolve it, but i have to, to get a course certificate in my school!
Damn it! I got it too, has anyone resolved this Error?
Oh, i got it! Damn thats clever!
This comment is hidden because it contains spoiler information about the solution
Why res in square brackets?
This comment is hidden because it contains spoiler information about the solution
How does this work? Never seen this before
Loading more items...