6 kyu
Basics 03: Strings, Numbers and Calculation
362 of 1,972smile67
Loading description...
Strings
Fundamentals
Mathematics
Arrays
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
I've been trying to do it for about a year) I've done it. Many thanks for this amazing kata!)
python new test framework
Approved by someone
C#: method name should be
PascalCase
(Please refer to implementation of backward compatibility here )Nice!
What should I do exactly with dots? I just don't get it
This comment has been hidden.
Great kata !
I think tests are wrong, for example on descreption randomtest3 exepected was - 210908 and when i try to submit it the expected is something else
descriptions 'integer' confusing 'int' or 'long'. how about "whole number"?
Input: 3Op6O4AUB37K.iIS6Wc9407gNJ9fpJ44pPg6ihj5Bn-JPOrXU]Bro\3N9a\p0Zacp\A80bEjkQH.Q43RC5IX20Ja01662 Expected= -2643, Your Result= 36039 I think my result is correct.
No, the expected result is ok. Why do you say your result is correct?
Removing the dirt:
Now I understand it. Thank's.
function calculateString(st){ return parseInt(eval(st.replace(/[A-Za-z;$%§?]/g,''))).toString(); }
This function returns the majority of answers correctly but some withing a +- 1 interval. I am curious as to why.
Because you're not rounding the result. You're using the wrong method there.
hey there, i just wanna say thank you for this. It took me more than an hour trying to figure it out, but it was a good eye-opener!
Good challenge!
Enjoyable kata!
Ruby translation
Please review and approve.
'alr approved some time ago'
Python translation
Node 10 should be enabled.
enabled;-)
should that be a problem? (I guess not, considering the rank, but...)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Approved - thanks for translation;-)!
Random test does not working correct, pls take windows calculator and calculate some samples in this. The result is different(
I have a working solution that do things right in VS2017, but when i copy that solution to CodeWars, it is not passing test like it does in VS. Can anyone answer me what should i do to get solution of this problem?
upd: CodeWars uses '.' as a delimeter for boolean variables, instead of ',' that VS uses. Fantastic =(
Can't include stdlib.h and therefore not use strtol which is kind of annoying...
-isystem /runner/frameworks/cpp fatal error: 'boost/lexical_cast.hpp' file not found
#include <boost/lexical_cast.hpp> ^1 error generated.
with code as simple as return "";
Should work now (tests were ok)! It was translated from c#, so not my c++ code. I hope my work on the c++ code was ok:-)...
Yup, now it works. Thanks. :)
This great kata is approved now! :-)
Hey Steffen, many thanks;-)! PS: Worked a little bit on your t.t.t. kata, hope tomorrow it will run (will see if i find the time);-) Wrote a new one because of our 50 lines talk yesterday (hope it's quick enough, i'm not sure... here less lines means simple code which will be not the quickest);-)...
t.t.t. kata? Sounds very familiar ;-)
Yes i know... so i think you've shortened your code after reading my text:-);-)?!
C++-Translation kumited!
Please check it and approve. Thanks! ;)
Really quick... nothing else to do:-)?! It's approved, many thanks;-)! And best regards to Steffen, his new kata took me 2 minutes instead of 1 (can't type very quickly on my small bluetooth keyboard)...;-)!