Ad
  • Custom User Avatar

    You can't really take code out of a function, remove one of the lines, and expected it to still work.

    Is this a human? All your kumites are just the default python/javascript tests copied into the code section.

  • Default User Avatar

    import codewars_test as test

    TODO Write tests

    import solution # or from solution import example

    test.assert_equals(actual, expected, [optional] message)

    @test.describe("Example")
    def test_group():
    @test.it("test case")
    def test_case():
    test.assert_equals(1 + 1, 2)

  • Default User Avatar

    return f"Hello {n}, you are very cool!"

  • Default User Avatar

    // Since Node 10, we're using Mocha.
    // You can use chai for assertions.
    const chai = require("chai");
    const assert = chai.assert;
    // Uncomment the following line to disable truncating failure messages for deep equals, do:
    // chai.config.truncateThreshold = 0;
    // Since Node 12, we no longer include assertions from our deprecated custom test framework by default.
    // Uncomment the following to use the old assertions:
    // const Test = require("@codewars/test-compat");

    describe("Solution", function() {
    it("should test for something", function() {
    // Test.assertEquals(1 + 1, 2);
    // assert.strictEqual(1 + 1, 2);
    });
    });

  • Custom User Avatar

    Please don't post solution in the discourse page.

  • Default User Avatar

    import codewars_test as test

    TODO Write tests

    import solution # or from solution import example

    test.assert_equals(actual, expected, [optional] message)

    @test.describe("Example")
    def test_group():
    @test.it("test case")
    def test_case():
    test.assert_equals(1 + 1, 2)

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    Rust translation uses two-space indentation while the standard for the language (rustfmt and the codewars tab size) is four.

  • Default User Avatar

    I mean resources that have typical examples that can help in understanding programming concepts

  • Custom User Avatar

    This kind of "mistake" is exactly something what Mel the Real Programmer would do when creating software for Bundesamt für Organisation in the early computing era.

  • Custom User Avatar

    It's no coincidence. jcsahnwaldt was working for the Bundesamt für Organisation back in 1964 and purposely made this "mistake" all in preparation for this kata which he had already planned.

  • Custom User Avatar

    According to footnote 6, the Swiss Bundesamt für Organisation made a mistake in 1964. I have no doubt footnote 6 is telling the truth.

  • Loading more items...