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.
Not even clear issue description ;-)
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 withsell_in == 7
andquality == 9
. On the first update,sell_in == 6
andquality == 11
. Next update,sell_in == 5
andquality == 14
. Etc.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.
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
Sorry for the confusion, the description was edited by some other contributers.
There is no preloaded code actually.
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.
This comment is hidden because it contains spoiler information about the solution
Error when tried in Python
NameError: name 'Fruits' is not defined
THe array should be defined
What language?
Preloaded as Fruits[];
return Fruits;
It isn't defined.
Fix this please.
Whats the point of lambdas in Ruby?
Haha nice!
Here's why I think you got it wrong
I don't believe the code kata inputs the questions array into any function.
Which edits would you suggest for the description?
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...