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.
I agree that this is a problem. I did the problem in C#. I am fairly confident my original solution was correct, but it was failing a test. After seeing this comment I 'fixed' my solution by subtracting a year from my loop and it works. The issue is with the Random Test, unfortunately without knowing what values are used it is impossible for me to show you mathematically what is wrong with the test. However, if you have a look at the solution I have submitted, you can see how I am looping for 1 less year than I should be.
In Rust there is no method associated with char to convert nonvalid utf-8 to something valid. The codepoints 128 - 255 also contain control characters. The meaning of those codepoints is depended on the chosen encoding. If at all there is a whole way of converting the unvalid utf8 points to other valid utf8 points, as Blablubqq suggests, there is not a 6kyu-level way of doing that. Methods with char: https://doc.rust-lang.org/std/primitive.char.html , create utf8 from bytes: https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8 and https://doc.rust-lang.org/std/str/fn.from_utf8.html
If, as I suspect, the particular encoding of the non-ascii part of the bytes 0 - 255 is not a part of this kata, maybe it is a good idea to let the value wrap around at 128 to avoid all trouble.
I had the same troubles in Python as Jo Kim and anter69. But I found out what does it :) If your code, like I did, does not calculate the decision to enter a loop as an iteration, then the only test that will fail is that last test of nested looping. I think it is easy to make that mistake, since (for me) the instructions suggested that a [ and ] only use an iteration if they are used for jumping. Actually if you read very precise, the instructions do not discuss if that is an iteration or not.
My suggestion is to make that clearer in the instructions, and/or add more tests that fail quickly in case you do this wrong. For instance: [e[e*]] with 5 iterations, desired result on a 4 x 2 field is 1100\r\n0000
I am actually pretty new to this site and to Python, if I should have put this message somewhere else or in a different way I am sorry warriors :)
suggestions for test cases for Python:
news.organisation.org
news.organisation.co.uk
ftp://ftp.members.important-club.org.uk/http
http://http.com
http://https.co.uk/?q=http://www.example.com/http
the description should really make more clear if you are seriously wanting all correct url's to pass, or only the urls that look 'common' as the test cases are now. I dont think you really want a parser for all correct urls, because the rules are supercomplicated (https://www.ietf.org/rfc/rfc2396.txt not even implemented correctly by some older browsers). so if you want simpler rules, lay them out...
Read the instructions again (I've modified them).
guys I am failing one test, third from botton on dangerous inputs
If the 2 values are the same type the
'
aren't shown.Solved. I appreciate it, thanks. PS. In console.log I got 2 and 3 as numbers — not '2' and '3'
I am not sure that I understand your problem. Could you give some examples if you want I can examine it. You can see that lots of guys passed the kata; the tests are the same in all languages.
May I suggest making values of
p
andi
unique?It would be much simpler for non-banker users to understand the kata from the provided examples point of few.
Making interest rate and inflation unique values would help a lot understanding the formula from the given examples.
I am pretty certain the testcases for this problem are one year short of what should be provided. I mean: when there is not enough money just for the last year, the testcases will judge it correct. See also similar comments below
Your problem is with 2 and 3 being strings. That way of testing if something is a number is strange.
This comment is hidden because it contains spoiler information about the solution
Done.
The Kata description says
not MUST be strings, there is a test where the button is a number and causes the test to fail if you return anything but 0. Please correct this in the description
Loading more items...