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.
Wow, "different people with different opinions and different motivation". I think I have learned some thing about life:D
You are so nice. Since I didn't focus myself on coding until this year, what you said make me think a lot about coding. Coding should be a way to relax myself, instead of just making money.
Cause my English is really poor,there are many things I don't know how to express...Whatever, thank you for telling me these things. LOL
Yes, surely a good reason so nothing to say against;-)... But here are different people with different opinions and different motivation, sometimes with good and sometimes with bad days, so not always everything is perfect:-)... You will see the longer you are here (and it is as everywhere). But generally everything is ok i think, sometimes with small exceptions... So always "keep smiling", it's not a job and without money, but surely a good practice;-)...
I'm an intern. And my leader told me : Never write any dirty but work code...That's why I come here to practice:D
Perhaps next time you find a better one... sometimes (not very often) i do such "dirty but really harmless things":-)... perhaps you will see: sometimes it's part of this game here too;-)
https://docs.python.org/2/tutorial/floatingpoint.html
I don't know if the kata is to make 0.005 as its difficulty. LOL
Anyway, it doesn't that matter.:P
Yes, you are right, so normally the solution should be without "0.00005".
But (the time i did it) there was a wrong example- testcase, so to pass example tests and submit tests this correction was necessary. I often complete katas on early stage, so sometimes my solutions get invalid because of testcase- changes and i often do no second try. This solution is already accepted, but normally wrong;-)... But only a little little bit, exactly 0.00005...:-)!
Well... nothing...
I don't think it's correct.
For example, 2.67499995 will get 2.68, while the answer should be 2.67.
See here: http://jsfiddle.net/J3Spt/
Maybe it's not much shorter, but at least it's algoritmic :-)
toLowerCase() is useful, but the "charCodeAt()" cannot return a prime number.Any other way to shorten the length?
:-) You could replace your function num with:
num_code_of_x = x.toLowerCase().charCodeAt(0);
This comment is hidden because it contains spoiler information about the solution