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.
It is a funny Kata, and it made me find out about Exceptions that I've never encountered yet.
Much harder than I thought at first, especially if you forget about The easiest way of making Kotlin throw a RuntimeException and try to exploit java interop.
Sure, here it is. Note that I reworked it several times trying to get it work with floats, and I tried to restore the first version. So it might lack some special cases, but the main idea is present.
Can anyone give a clue on the task?
I know how to solve the task for integers, but no idea on how to deal with floats...
I don't insist that you change the kata, after all it's your course. But I can't agree with you. I don't think it's good when you write something in one language because it might be necessary in another one, especially because it will still look different in other language and because when you are switching to some other language, You will need to get used to its syntax and all. And people get used to thinking about datatypes after they get several Type Errors (and I think it's better to let students make their own errors, at least in this case). Avoiding variable remaining uninitialiized in case of errors is a good point, but a) this should be mentioned then and b) usually you check your input first and do calculation after passing all checks.
Please remove "variable declarations". I mean things like
a = 0
beforea = int(input("some question "))
. It is unnecessary and makes code less readable. If you are trying to make a course of Python, you should explain, that one should not 'declare' variable before assignment.third testcase is broken, it misses 'types('
Hi. Python also uses snake_case instead of camelCase. Fix please.
http://www.codewars.com/kata/generating-permutations/python — itertools.permutations are somehow blocked. May be @electricjay could tell how to do it...
I don't know. I'm almost sure I've seen some katas with blocked import, I just can't remember what was it, otherwise I could look at test cases there, or something...
I tihnk, there should be some way to get function code, then you can check for word 'import' in it.
This comment is hidden because it contains spoiler information about the solution
In Pyton snake_case should be used instead of camelCase
Thanks, it took several days to deal with all edge cases, but it was a pleasure to have this kata solved. I did really enjoyed the whole series.
And thank you for explanation. Now I see where I was wrong. But I still think, this should be mentioned in description (all this thing about non-integer rates and so on), because it isn't obvious.
I think I'll rework my solution now to avoid that horrible workaround.
This comment is hidden because it contains spoiler information about the solution
Hi. Great set of katas, it was niice to master them all. But there is a problem with messages with overall bit per time unit rate of 2. I've found that in these messages '1111' is considered to be dot (so, it's '11', just bit longer) and '0000' is considered to be one space (so it's '000000', just a bit shorter). It took rather long time to find this thing, and I've found no mentions about such thing possible. And also haven't find any good way to handle these cases correctly (I think that my handling of it is rather ugly).
So I suppose this should be either fixed or mentioned in description.
Well, as long as you can only publish solution if it passes all tests, I think we can assume that all code is correct. So if we have two solutions which arecompiled OK and pass all tests, and these solutions only differ in quotes used... Well, I think it's obviously same solution. At least I can't imagine same solution working both with chars and strings (if it's different types).
Loading more items...