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.
The random tests incorrectly expect it to be possible to delete a class attribute from an instance. On a normal Python class, this raises an AttributeError. Solutions that preserve this normal behavior should be accepted.
Am I the only one who followed the directions and wrote an infinite stream (up to integer precision) rather than sieving to a predefined limit?
Agda test cases should not
open
the solution; that can often be exploited to bring unexpected definitions into scope.Before I could start coding, I had to manually concatenate the preloaded snippets interspersed through the description and hunt down some missing imports. Please make the preloaded part directly copy+pasteable and/or uncommentable.
From
Preloaded
:The zeroth power is not nonsense; it serves as a base case in the natural definition
and falls out automatically from the other natural definition
Of course, task 2 would then need to change to
ℕ ⇔ ℕ^ (suc n)
.That was clearly wrong, so I fixed the test to expect a set with an empty array.
Oops, this version has a bug with a small number of (untested) inputs, see the fixed version.
Something seems to be wrong with the Python tests. This dummy function should pass the first sample test:
but it crashes with
(I tried both Python 3.4.3 and Python 3.6.0 with the same result.)
This comment is hidden because it contains spoiler information about the solution
This doesn’t satisfy “An invalid program should raise a type error rather than a runtime error.”
This doesn’t satisfy “An invalid program should raise a type error rather than a runtime error.”
This doesn’t satisfy “An invalid program should raise a type error rather than a runtime error.”
This doesn’t satisfy “An invalid program should raise a type error rather than a runtime error.”
This doesn’t satisfy “An invalid program should raise a type error rather than a runtime error.”
This doesn’t satisfy “An invalid program should raise a type error rather than a runtime error.”
Loading more items...