Ad
  • Custom User Avatar

    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

  • Custom User Avatar

    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?

  • Custom User Avatar

    thanks! it helped

  • Custom User Avatar

    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?

  • Custom User Avatar

    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?

  • Custom User Avatar

    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:

    1. I don't quite follow, I need to think this through
    2. I will change the task to be more specific

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I fixed that. Now the last value from the input data will be always greater than 0.1

  • Custom User Avatar

    Thanks, it was by accident. I fixed this issue.

  • Custom User Avatar

    Could anyone give me a hint? I understand what it is about and everything works fine except time out issue. I have no idea how to sort this out. I am using gradient descent to find two line coefficients and loss function is a mean squared difference between approximated solution and given y values (so it is MSE I think), what should I change?

  • Custom User Avatar

    Thanks for that remark!
    As you can see I am not a master of regex :D