Replies: 2 comments
-
Are you talking about this one?
I mean the description isn't perfect by any means but it's not that bad either. While it may or may not be an ideal to strive for, Codewars challenges aren't generally meant to be understood by their descriptions alone; you're supposed to look at the solution template and sample tests too. Here they are for JavaScript. function hero(bullets, dragons){
//Get Coding!
}
const chai = require("chai");
const assert = chai.assert;
chai.config.truncateThreshold=0;
describe('Fixed tests', function() {
it("Testing for fixed tests", () => {
assert.strictEqual(hero(10, 5), true);
assert.strictEqual(hero(7, 4), false);
assert.strictEqual(hero(4, 5), false);
assert.strictEqual(hero(100, 40), true);
assert.strictEqual(hero(1500, 751), false);
assert.strictEqual(hero(0, 1), false);
});
}); With the sample tests shown above and the function skeleton, don't you think this is easier to solve? |
Beta Was this translation helpful? Give feedback.
-
Yah, some of the descriptions are not super clear/obvious right off the bat, but... If you take all three informative areas (Instructions, Failed Output, Sample Tests) you can usually make sense out of it in the end. |
Beta Was this translation helpful? Give feedback.
-
i did the first 2 or 3 koans and then the 4th was unclear my solution was working on my machine. So I skipped that and tried to understand something about two dragons and bullets but frankly it was so poorly explained that I'm a head out and learn to code by myself. C ya
Beta Was this translation helpful? Give feedback.
All reactions