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.
You have to return o if the score is <0
got it... Thanks!!!!!
Because there is no variable called "secret" accessible to your function. You also shouldn't be referencing the secret in your solution at all, you are supposed to generate the secret from the
triplets
input.secret = secret.replace('', ' ').split()
so why is this line of code a problem? it says referenced before assigned.
You are supposed to return the secret, you aren't really supposed to know what the secret is before you've solved it. The kata lets you know the first one right away so you can work out how to get that string from the input, so you can then apply that same method to the other tests.
its not about that line of code. i did secret = secret cos i was struggling and didnt know how to include it in the code. my question mainly is, How do i represent the variable secret in my code? its that simple. 'refactor your code' is quite vague.
secret = secret
??you need to refactor your code.
do you atleast understand where or how to incooperate the secret as a variable? I really think it should be added to the function as a parameter.
why does it say refrenced before assigned? This kata is pretty confusing. I think there should be a parameter for the secret string in the fuction braces! I have solved it in my vscode and its all perfect! Any help please???
something other than secret..
Hi. what variable should I used for the 'secret' string? Because I used 'secret' but its saying refrenced before assigned
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Read the standard troubleshooting documentation on the Codewars website, specifically this section:
My solution works on my machine, but not on Codewars
edit by the way I think it's unlikely that your code "works perfectly" on Visual Studio - are you telling me that:
chr(ord(i) + 13)
works for, e.g., inputs of
t
that occurs in the stringtest
?This comment is hidden because it contains spoiler information about the solution
Loading more items...