Ad
  • Custom User Avatar

    Not even clear issue description ;-)

  • Default User Avatar

    I think your error is here: 6=>5 increase by 2 quality = 13. This update is done on sell_in == 5, so the increase should be 3. You start with sell_in == 7 and quality == 9. On the first update, sell_in == 6 and quality == 11. Next update, sell_in == 5 and quality == 14. Etc.

  • Default User Avatar

    This solution of mine isn't consistent.

    var code = [5,5,5];
    function tryCode(indications) {
    // TODO : indications are null or a 3-digits array.
    if(indications){
    indications.map(function(e,i){
    code[i] += indications[i];
    })
    }
    return code;
    }

    This is my refactored solution! Codewars is having problems with accepting another solution.

  • Default User Avatar

    Your description needs work

    0 = correct digit
    -1 = higher digit
    1 = lower digit

    I have to interpret your example and not your instructions.
    FIX IT PLZ

  • Custom User Avatar

    Sorry for the confusion, the description was edited by some other contributers.
    There is no preloaded code actually.

  • Custom User Avatar

    There is no preloaded code.
    You can create a list/array of 100 fruits by yourself. However you can also solve the problem without creating the list.

  • Custom User Avatar

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

  • Custom User Avatar

    Error when tried in Python

    NameError: name 'Fruits' is not defined

    THe array should be defined

  • Custom User Avatar

    What language?

  • Default User Avatar

    Preloaded as Fruits[];

    return Fruits;

    It isn't defined.
    Fix this please.

  • Default User Avatar

    Whats the point of lambdas in Ruby?

  • Default User Avatar
  • Default User Avatar

    Here's why I think you got it wrong

    1. your parameter in the function is arr
    2. the array in question is called questions

    I don't believe the code kata inputs the questions array into any function.

  • Custom User Avatar

    Which edits would you suggest for the description?

  • Default User Avatar

    I don't think you're wording the backstage conditions correctly or they are not very clear:

    Here's what I understood from it at the beginning:
    Backstage should increase in quality += 1 every sell in
    If backstage sell ins are <=10
    they should increase by 2 instead
    If backstage sell in are <=5
    they should increase by 3 instead
    end

    Here you have a backstage with 7sell in, 9 quality. Let's count the sell ins.
    7=>6 increase by 2 quality = 11
    6=>5 increase by 2 quality = 13
    5=>4 increase by 3 quality = 16
    4=>3 increase by 3 quality = 19!!!!!!!!!!

    Thats 4 days. Where the final sell in/day is ending at 3. Going from 7>6>5>4. 2 of those days should be +2 each. The other 2 should be +3 each.
    I know the answer it's testing for is +quality: 2,3,3,3
    But the wording is very vague and confusing.

    Starting items in the store are {Conjured Goblin Axe +5, 7, 13}, {Canned Laughters, 9, 12}, {Priss and the Replicants Backstage Passes, 7, 9}, {Conjured Goblin Axe +5, 9, 38}, {Zero Zone Kevlar Vest +1, 8, 22} and 4 days passed

    OUTPUT:
    Checking item 3: Priss and the Replicants Backstage Passes
    Test Passed: Value == 3
    Not the expected quality value - Expected: 20, instead got: 19

  • Loading more items...