Ad
  • Custom User Avatar

    the issue is with how you measure whether your code is correct. by measuring differently from the tests, you get a different outcome. if you measure the same way, you will find that your function misbehaves. for example:

    assert digitize(123) == [1, 2, 3]
    
  • Custom User Avatar

    You're printing something and returning something else. There is no issue with the kata.

  • Custom User Avatar

    There seems to be an issue with the Kata. All test and attempt fail even when the List (Python) is shown exactly as in the example. Tried casting to string and int as well but no way to fix it?

  • Custom User Avatar
    1. Please use spoiler flag next time (since the random tests code you provided shows one possible solution to this kata),
    2. Publish your code as a fork of the JS version. This way it will be easier for a moderator to review it.
  • Custom User Avatar

    Python translation (author gone)

  • Custom User Avatar
  • Custom User Avatar

    Rejected by someone, see remarks in translation above

  • Custom User Avatar

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

  • Custom User Avatar

    expect(caffeineBuzz(4)).to.equal("mocha_missing!")?
    4%4=0 then expect Coffee

  • Custom User Avatar

    // This JavaScript sample tests may help you getting started:

    const { expect } = require("chai");

    describe('Example tests', () => {

    it("returns correct values", () => {

    expect(caffeineBuzz(1)).to.equal("mocha_missing!");
    expect(caffeineBuzz(2)).to.equal("mocha_missing!");
    expect(caffeineBuzz(3)).to.equal("Java");
    expect(caffeineBuzz(4)).to.equal("mocha_missing!");
    expect(caffeineBuzz(5)).to.equal("mocha_missing!");
    expect(caffeineBuzz(6)).to.equal("JavaScript");
    expect(caffeineBuzz(7)).to.equal("mocha_missing!");
    expect(caffeineBuzz(8)).to.equal("mocha_missing!");
    expect(caffeineBuzz(9)).to.equal("Java");
    expect(caffeineBuzz(10)).to.equal("mocha_missing!");
    expect(caffeineBuzz(11)).to.equal("mocha_missing!");
    expect(caffeineBuzz(12)).to.equal("CoffeeScript");
    

    });

    });

  • Custom User Avatar

    Your solution has more than one problem, probably caused by somewhat confusing description. First of all, you do not apply the odd/even multipliers correctly, your call to mapi is not correct. Then you do not reduce the obtained numbers to single-digit ones.

    You need to fix your solution. In case of problems, you can ask for help in #help-solve channel of CW Discord.

  • Custom User Avatar

    Language: F#
    It fails test 1-4 and 6 but all other passes, manually testing it works fine on my end.

  • Custom User Avatar

    Approved

  • Custom User Avatar
  • Custom User Avatar

    Fixed.

  • Loading more items...