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.
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.
This comment is hidden because it contains spoiler information about the solution
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
Loading more items...