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.
Thank you very much for explanation.
Okay, fixed ;-)
This is a beginner kata.
I changed the last part of the description, it should be better now.
Yes.
We all know that the description is not very good, but unless someone has a good idea how to improve it (and actually edit the kata to replace it), there's not much we can do. I don't think I'm qualified to do this either.
All eggs are identical, it's like a countable resource. You can drop an egg any number of times as long as it hasn't broken. With 2 eggs and 14 tries you can drop until 2 eggs have broken or you reached 14 tries.
Please raise questions about a Kata as a question, not an issue.
That being said, I haven't completed the Kata but likely eggs decrement when one gets cracked, while tries decrement every time.
Theoretically an easy fix. Isolate the user's program and make the only communication between it and the tester the return value.
In practice, you may just want to prevent users from reassigning the == operator.
eval is disabled, but instance_eval is not.
I thought of the same thing and passed a kata but didn't submit it because it seemed obviously dishonorable. IDK how this could be detected without some clever parsing, but looking at output types might make the easy cheats harder.
class trollolol(int):
def init(self):
self.value = 'trollolol'
def eq(self, other):
return True
def proper_fractions(n):
return trollolol()
I do agree...
That is pretty clever though.
Just saying.
This comment is hidden because it contains spoiler information about the solution
I thought that function only works with chars, but it is correct, works too with a CharSequence.
https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#replace-java.lang.CharSequence-java.lang.CharSequence-
Loading more items...