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.
Just a heads up I failed a random test and then passed when I resubmitted without changing anything in my code, suggesting there may be an issue with the random tests. I failed on inputs (3, 3, 40??), I'm sorry I didn't save it because I was wxpecting to fail again and troubleshoot from there. Anyway, I would look at what happens when s1==s2 and ensure everything is defined/explained clearly.
If you're still struggling with this one:
how does your solution handle invalid inputs(according to the prompt)?
Check your conditions. I had this issue because I wasn't dealing with the inputs correctly per the prompt. Once I cleaned up my conditionals it passed without issue.
Not sure if this is what's happening to you, but just wanted to mention since it's a similar result.
Here's a quick breakdown comparing:
x = y
x = y[:]
x = y.copy()
https://www.programiz.com/python-programming/methods/list/copy
I believe it's because when you run the full test suite it randomly generates a new alpha dictionary, but the sample tests are still based on the fixed basic alpha. When you run the full test suite, it actually calculates using the new, random alpha, and that's why you passed when it came to the full test suite.
It's just a bug in the kata caused by making alpha a global, preloaded variable instead of a parameter (as it probably should have been). If it causes any problems, you can get around it by resetting the alpha at the beginning of the sample test suite.
(sorry, i know this is an old post, but i'm also leaving this here for anybody having future difficulties with this kata)
Added a fixed test to all languages just in case.
This comment is hidden because it contains spoiler information about the solution
1 year later and I'd like to bump this. I'm very curious to know what of my solutions have been upvoted so I can get a better idea of what other programmers think is good in my code.
read the docs.wait... that's actually an issue, apparently...
Did you ever figure this one out? I'm getting the same error and I have no idea what it means.
edit: actually, I'm getting it before the second "Base clsas check", but it's the same TypeError.
Can someone unpack this? How does this create the zigzag?
3 years later and I had to come to the comments to figure out what type of answer this kata was looking for, I'm glad your post was here.
I don't know what happened. When I tried the sample tests I failed every one, but when I clicked Attempt I passed them all. I think something is broken in the tests for python.
{'JGEVB': 1, 'OUDCN': 2, 'MXLAS': 3, 'ZWTYP': 4, 'RQIHF': 5}
This was my random alpha, you'll notice K is the letter that was skipped. If you add up the letters of "Luke Skywalker" that exist you get 29. But the test says the correct response is 41. I keep failing tests, but when I add up the example from the random alpa given it matches what my code outputs, not what the expected result is. What am I missing?
Given it's Python you're talking about too:
Loading more items...