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.
500 allows the cheese to barely pass this kata. Perhaps go to 1000 tests?
Can be cheesed in Python.
Finite decimal representation (except for recurring digits) => only rational.
Are the decimal numbers rational numbers or can they be irrational, transcendental?
[Python]
IMHO
'0/1'
is better than'-0/1'
.Why keep an useless
'-'
when all other things are simplified?For example:
'0.2'
->'1/5'
();'2/10'
'00'
->'0/1'
();'00/1'
'00.00'
->'0/1'
()'0/100'
or'0000/100'
this kata: input is a string with (optional) recurring digits
https://www.codewars.com/kata/569792aa413feea7b3000036 : input is a floating point number, there is a tolerance and a maximum denominator; different algorithm
https://www.codewars.com/kata/5c83c3cd776dec01b424a1d1/ : retired
There's also this one, which does overlap - but not for the original language ( Rust ).
The three languages of this one and the two of the other have a total overlap of zero.
I wouldn't know what to do in this situation.
Duplicate https://www.codewars.com/kata/569792aa413feea7b3000036
Good work! One small oddity: for inputs like "-0", the function cannot return "-0/1"; it must remove the negative sign. I'm not sure if that was intended. You might want to clarify in the description, or allow "-0/1", or completely remove any test cases with "-0".
Good kata!
I like these math problems ;)