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.
I have the same problem... this task seems to me unclear because nothing works. I completed the easier one and I though this is in the same manner but it is senseless to guess what to do
I don't get it at all. I defined __ and __ and __ or __ methods in Specification class and in test cases I keep getting the following error:
TypeError: unsupported operand type(s) for &: 'type' and 'type'.
I though that Water and Hot classes inherit from Specification class... Any hint?
thanks! it helped
Please switch Python version to 3.8 and see if it helps.
I passed all of the test cases, but when I push attempt button I got:
"Traceback (most recent call last):
File "main.py", line 4, in
import codewars_test as test
ModuleNotFoundError: No module named 'codewars_test'"
what is it about?
I passed all the test cases but I'm stuck at random test. I have to following error:
Traceback (most recent call last):
File "/workspace/default/src/codewars-test/codewars_test/test_framework.py", line 111, in wrapper
func()
File "tests.py", line 108, in it_1
template(b, n, l)
File "tests.py", line 95, in template
test.expect(all(getattr(user, x) == getattr(result, x) for x in value_names), "Expected: {}\nReceived: {}".format(result, user), allow_raise=True)
File "/workspace/default/src/codewars-test/codewars_test/test_framework.py", line 24, in expect
raise AssertException(message)
codewars_test.test_framework.AssertException: Expected: <main.random_tests..template..B object at 0x7fae26dbba30>
Received: Ofrsngx(14, 10, 17)
I cannot figure this out. Could anybody give me a hint?
About forbidding modules:
Here is old code from one of my katas, it would give you the general idea. You need to include this code in
Preloaded
section. (note, thattest
isimport codewars_test as test
)Now I've found the kata that concerns the Euler's method. I've been planning to create the whole series about solving systems of differential equations and I wanted to start off with something easy. Maybe I will transform the task into the system of two equations or, as rge123 suggested, I will enforce improved Euler's method.
Answering dolamroth suggestions:
Now I am aware that I should disable some functions but I can not figure it out. How to block a function? I know it may be a silly question but I've been trying to find this out and no success.
This comment is hidden because it contains spoiler information about the solution
I fixed that. Now the last value from the input data will be always greater than 0.1
Thanks, it was by accident. I fixed this issue.
I would suggest to make kata with differential equation, that does not have analytical solution (i.e. riccati system) and enforce large difference between
y(0)
andy(T)
. Furthermore, as Unnamed suggested, you should disable some Python modules, that allow user to cheat the kata.I agree. There is also already a kata on Euler's method. Maybe enforce a more efficient algorithm (and defo make it non-analytical)?
What about this?
The reference solution times out sometimes, for example, with this input from the random tests:
[4, 4, 1, -5], [0, 0.2], 0.0
.Loading more items...