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.
I'm confused about what our function is supposed to return -- phone numbers that are valid or the regex pattern used to match them?
Thank you, that's extremely helpful.
if you create a file structure like this on your pc:
then the path to
confidential
is/important/confidential
there's no
/confidential
, that would look like this:but now you have two different
confidential
, and you would be referring to the wrong one, unless of course/confidential
links to/important/confidential
which it very well could, but you know nothing about that and shouldn't assume it does.it's the same with
index.html
anddocs
, they too are not directly under/
First of all, thank you for the sound advice to a newbie like me. I made note of both points. I am working on the Breadcrumbs Generator kata, in which we write code (in Python in my case) to made URLs into Breadcrumbs. So, for example, we take a URL like:
microsoft.com/resources/help/support
and change it intoHOME * RESOURCES * HELP * SUPPORT
. The problem is that one of the four initial test cases takes"www.microsoft.com/important/confidential/docs/index.htm#top"
, which from my understanding of the assignment, should turn intoHOME * IMPORTANT * CONFIDENTIAL * DOCS
. For each hunk the underlying anchor should be to the appropriate section. And yet the approved answer has two of the sections combined in one anchor, which seems like it shouldn't be. This is the test case in question:compare_bc(generate_bc("www.microsoft.com/important/confidential/docs/index.htm#top", " * "), '<a href="/">HOME</a> * <a href="/important/">IMPORTANT</a> * <a href="/important/confidential/">CONFIDENTIAL</a> * <span class="active">DOCS</span>')
Notice that CONFIDENTIAL has"/important/confidential"
in its anchor, instead of just"/confidential"
My solution is failing only on this one test, and I don't see how, following the rules of the challenge, I could pass it. So that's my question or problem. Is it the test that messed up, or am I missing something?first of all, please use the tag
question
when you are asking something.use markdown to mark code as code so that it does not get interpreted as formatting:
as for the question:
that is the location of confidential. it's not directly under
/
discuss
here doesn't sit under/
:because then which kata are you discussing?
Is this me or Code Wars? Here's the original URL and separator:
"www.microsoft.com/important/confidential/docs/index.htm#top", " * "
This is what I delivered:
'HOME * IMPORTANT * CONFIDENTIAL * DOCS'
This is what I'm being told I SHOULD have delivered:
'HOME * IMPORTANT * CONFIDENTIAL * DOCS'
Why would we want groups 2 and 3 smushed together under the link for group 3? That makes no sense to me, and it does seem to accord with the instructions for the exercise. After I posted this I realized that the problematic aspect was turned into links in my post. The links for CONFIDENTIAL in my version is the a-link href for "confidential", whereas is their version it's an a-link href for both "important" and "confiential", with the two run together inside one a-link tag.
Okay, I'm very confused. I thought the idea was that we put a first string into the first (encoding) program, which then produced a second string and a number. And then, if we fed the second string and the number into the second (decoding) program, we would end up getting the first string back again. This would seem to be a self-testing pair of programs. If A produces B, but then B gives us C, it's not working correctly. So I run the first few tests, and all go well. Then I run the humongous set of tests, and I'm told that in between two and four cases, I'm getting the "wrong" result out of the encoding program. But if I feed what they provide into my encoding program and them put it back through to be decoded, it all seems to work. I haven't a clue as to how to begin to troubleshoot these few "wrong" answers that seem to be right, according to the results I get. I even tried my encoding/decoding programs with a string that was hundreds of characters long, and it still seemed to work. Ideas? Suggestions?