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.
@Anjali Singh why did you copy the tests code? Please use the initial code:
Probably you forfeited the kata. Not the same problem as the OP one.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
same with me ia am using python but it is showing wrong
As of 2024 ~~ 10 years later, your solution passes the kata, closing ! ^^
OP solved it, closing. The original solution posted above has a wrong syntax --> should be
+(++x)
As of 2024 ~~ 10 years later, your solution passes the kata, closing ! ^^
python translation
please, wha is OP??. i have the same issue
Seems too easy for a 5kyu
Description does not ask you to return
equal
. It specifies to return the modified string except when the final string is longer than 140 chars / empty , or when the original input is already empty.Your code, OTOH, returns
equal
for final strings of length 140, modified string for lengths less than 140 andFalse
for other cases.I already told you exactly which sample test your code is failing, use Pythontutor or other IDE to debug your code step by step and see what's wrong with it. Don't chain methods until you properly understand what they return in each of them, pull them apart and log what they return, you'll find out what's wrong with your code easier that way.
hi how did you solve this problem
Undefined is valid only when it's "" in test - empty string has no length. So I add check on string.length with break to quit code execution: switch (str.length) { case 0: return false break} ABOVE toUpperCase method line, so it had to be irrelevant wether toUpperCase were used in code in lower lines or not.
Why have testing keep throw an toUpperCase error when I quit code execution before toUpperCase method has been applied?
Loading more items...