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.
The instructions on this Kata need to be made far more clear.
For one - you must increase the percent of devaluing at the beginning of month 2, or you will not get the correct answer.
The instructions counter intuitively state
Furthermore this percent of loss increases by 0.5 percent at the end of every two months.
meaning I only came to this conclusion via trial and error.On top of this, the level of rounding required is entirely unclear.
When recalculating the new value each month, do we need to round the figure? Up/Down? To how many places?
So far, no matter what combination of rounding methods I use, I always have at least 3 test cases where my remaining figure is out by 1 - I'm slowly moving my decimal out, and will hopefully hit it soon.
This is an interesting Kata, and as a Junior who is learning I have found it useful in many ways - the best lesson is that requirements should be clear from the get go.
Have had the same issue as above, with many tests.
So far consistently getting 20-30 failed tests per run.
Manually spot checking tests has shown my solution to get the correct response, yet the test still fails.
{ tim: 'finance',
jim: 'regulation',
randy: 'regulation',
sandy: 'pissing about',
andy: 'trading',
katie: 'finance',
laura: 'regulation',
saajid: 'retail',
alex: 'IS',
john: 'pissing about',
mr: 'trading' }
It should work for random inputs too - Expected: 'kill me now', instead got: 'i can handle this'
TOTAL: 88 - return 'i can handle this'
{ tim: 'accounts',
jim: 'IS',
randy: 'cleaning',
sandy: 'IS',
andy: 'IS',
katie: 'pissing about',
laura: 'regulation',
saajid: 'retail',
alex: 'change',
john: 'pissing about',
mr: 'pissing about' }
It should work for random inputs too - Expected: 'kill me now', instead got: 'party time!!'
TOTAL: 118 - return 'party time!!'
Ran a test using the below code;
function boredom(staff){ return 'kill me now' }
All randomised tests passed - 2 failures from sample tests which appear to run correctly.