Crystal Translation done, please check.
edit: btw, you're not supposed to have an argument to that function (you need to learn a bit more about class/OOP design and how to declare methods in such a kind of situation)
You can read about code formatting on CodeWars wiki.
I could use some help with this one. I've worked out what I need to do, I just can't seem to make the code work for it for some reason. I keep coming up against the error: wrong number of arguments given, expected 1, received 0.
Unfortunately I also can't work out how to post my code in the comment boxes either so if someone could also tell me how to do that I can add the code into this.
Thanks in advance
I like this too, but I didn't know you could change the method signature, but your way of doing so was elegant. It effectively side-steps the whole issue.
thanks to you two :)
Thank you so much! after some looking around and testing I was able to get it and I am very surprised at that too. Thanks again!
i dont know python but i can say how i started js. learn data structures started by doing simple thing like manipulating an array or object in functions. and start your 8th 7th kyu challenges. i'm still a begginer though so i hope it helps
I'm not sure about the material but I hope the following steps will help you go through this kata.
You are give an integer or you can say a number in this kata.
P.S - The figuring out part can be as simple as a google search 😉. Make sure you understand the concept and then try attempting the kata or it will be of no use.
I am new and needed help. Is there any material that would help me with this task? I use python
i will try to create an if statment for 32 bit
It fails only this sample test, but will probably fail more test cases from full test suite.
Yes, your solution has an error.
Did you try to recreate the test case for Number.MAX_SAFE_INTEGER locally and see how it works and why it might fail?
Did you try your solution with Number.MAX_SAFE_INTEGER?
Your solution fails sample test for Number.MAX_SAFE_INTEGER, or actually for any number lager than 32 bytes.