Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
In the unittest given, shouldn't
assert_equals(a, b)
beassertEqual(a, b)
with Python??See [https://docs.python.org/3.6/library/unittest.html#assert-methods]
It helped to skim over the discourse prior to attempting this Kata. In particular, the improved description provided by designerzim was comprehensive and cleared potential misunderstandings.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
My solution in Python 2 was not passing the tests for non-square numbers when using
return 'false'
, but it passed the tests withreturn 'true'
with square numbers and all tests with random numbers.What was wrong?
This kata raised my awareness of Python indentation to a new level.
I ran your solution in both Python 2 and Python 3 here and no errors like the one you mentioned.
Your solution is working just fine. Check your indentations and try again!
"Indentation in Python is everything". I am refreshing this the hard way. But ok since I don't practice full time.
Maybe the problem statement should hint on that.