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.
Not sure where my previous comment went. But I was able to successfully solve in JavaScript. Wasn't a kata issue. I wasn't meeting the validity requirements of having AT LEAST one of lowercase letter, one uppercase, and one number. I simply overlooked the lowercase requirement...
Thank you! :D
You are printing instead of returning the results, so by default the
password_gen
function returnsNone
. Do read this on how to write solutions to katas and troubleshoot them on CWHello, when I run my code through VS code it works. But when I test it on here I get this error message:
Traceback (most recent call last):
File "/workspace/default/tests.py", line 9, in
lower = any(c.islower() for c in pwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
Please can someone help me?
Merged.
js update
the test logic remains the same but is rewritten to facilitate the clarified failure messages or because I didn't like how it looked at me
JS tests print AFTER assertion
assertion fails -> exception -> print never happens because exception exited the function early -> no information given to solver what's wrong
the python tests are also written this way but that test framework doesn't exit early on failed assertion (it should though, and it could conceivably change that behaviour)
the test code intended to print out failure messages but was written in an incorrect way that used to "work" but now doesn't (specifically there were console.log's after assertions - but a failed assertion raises an exception and thus exits early and skips code after it)
the tests have been updated, they'll now tell you what they don't like.
so there are 5 tests total. The one I'm failing is the 'validity' test.. Any information on what this is expecting?
in JavaScript:
Passing all 4 tests(10k passwords generated, testing lengths, testing inequality, testing character count)
proceeded by 1 fail saying: "Invalid passwords generated!: expected false to be true"
Is there something I'm missing here?
Agreed.
Very nice. my take on this sorted the odds the same. But I really dig the way you handled the data thereafter.
Last test isn't truthey
Nice. I also used a filter with an arrow function. But this elicit function makes it one line shorter.
I really dig the way the alphabet array was created here.
Loading more items...