I removed the restricion of the math library, but I find out the kata can be solved almost completely with builtin modules I will still have to find a way to ban it.
Of course it can be bypassed, but I guess you saw the test cases implementation, nevertheless one can always cheat.
You cannot use any libraries, not even the math library
Does this add anything to the kata? (Protip: it doesn't.) If you don't even want people to use math libraries, you should write the kata in C++, not Python.
(Also, your check is easily bypassed, and given this is Python there will be bypasses everywhere.)
No, there is no real benefit besides the fact that it is shorter and fun to try.
In my opinion one liners should only be used if they improve readibility by making trivial code take up less space.
But in this case it is better to split it up in like 4 or 5 lines.
user solution now gets copies of p1 and p2.
Oops, sorry. Should be fixed, user solution now gets a copy of p1 and p2.
Reopening Voile's issue:
This is what they meant
Ok, you're right, if pep8 tells me to use snake_case I will, so I fixed those two names.
I removed the restricion of the math library, but I find out the kata can be solved almost completely with builtin modules I will still have to find a way to ban it.
Of course it can be bypassed, but I guess you saw the test cases implementation, nevertheless one can always cheat.
Should be resolved, I made the functions the solution uses local, I guess that's what you meant.
Modifying the input will break the random tests.
Does this add anything to the kata? (Protip: it doesn't.) If you don't even want people to use math libraries, you should write the kata in C++, not Python.
(Also, your check is easily bypassed, and given this is Python there will be bypasses everywhere.)
This is rather an issue
Why?
The function names should be in snake_case in Python.
Thanks for showing me you can multiply arrays like that
No, there is no real benefit besides the fact that it is shorter and fun to try.
In my opinion one liners should only be used if they improve readibility by making trivial code take up less space.
But in this case it is better to split it up in like 4 or 5 lines.
Best solution, all others don't make the trans in advance
This comment is hidden because it contains spoiler information about the solution
Loading more items...