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.
No random tests in Ruby
Ruby 3.0 should be enabled
There should be more random tests for odd number of digits to avoid solutions like this.
Javascript:
Couple of conditions mentioned in the description are not checked in the test cases
Go translation
Hey, @SandaySalsa! Description and Ruby test cases aren't clear! Or this kata like puzzle, guess what should be:
luck_check('6F43E8') == false
orluck_check('6F43E8') == 'Error'
or end of program :) Andluck_check('')
in test cases will be an error.Yours sincerely,
FridayBachata
(Ruby) cannot pass the invalid string input tests (only for submit, test button works). If I return 'error' or false, I still get: "The function somehow worked with wrong input"
"6F43E8"
"Error"
The function somehow worked with wrong input
"1234 "
"Error"
The function somehow worked with wrong input
""
"Error"
The function somehow worked with wrong input
Pretty sure the test cases are broken. Once you get to random testing, the tests expects you to return false on invalid input instead of throwing an error.
Also the description should probably be more detailed about dropping the center character on input with odd length.
It's strange but tests work differently when I click 'Run test' and 'Submit'.
I had my tests failed with incorrect argument when I use
raise unless ...
but same tests had passed when I click 'Submit'!This comment is hidden because it contains spoiler information about the solution