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.
yikes
'xrange' is a function in Python 2.x.
In Python 3.x, use range() function instead.
It's still likely to break things downstream because n/i will have a float type rather than int, doing annoying things like producing unwanted ".0" in printed output and str() conversions.
Really frustrating. I thought that initially as well and tailored my solution to it. When it was only letters and numbers, it passed. But with the random test cases I got a bunch of bugs, and now i have to write the code all over again( which I won't). all the different test cases should have been specified in the problem description . This is necessary because any one who tries to solve a problem needs to understand what test cases exist to write a solution around them.
Absolutely this ^. Really frustrating spending time trying to complete it only to see my approach was way off just because the instructions were not clear.
Completely agree and especially since all the sample tests follow this logic... Would it be possible to either make it clear in the instructions or to include a sample test which makes people understand the string might be a bit more complex than an alphabetical string followed by a numerical string?
Note in Python 3 it should be n // i
The only reason this Python 2 code did not break is that it's only running while n % i == 0, so it happen to be only feeding numbers that divide into whole numbers anyway.
NameError: name 'xrange' is not defined
'xrange' was renamed to 'range' in Python 3 appearently.
Also I would change n /= i to n //= i to more explicity call integer division, tho I'm not certain it matters since it's only running on modulo 0 stuff in the while loop, but normally it would cause some undesired non-integer results.
How's it not a kata issue? I too was surprised a 4 kyu was so straightforward and easy. Searching for katas with "too easy" in comments is a good way to rank up quickly I guess, if nobody's willing to fix the scoring.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...