Ad
  • Custom User Avatar

    Note: This kata uses the non-padding version ("=" is not added to the end).

    Some reading will help

  • Custom User Avatar

    Sorry I misread your code and forgot this kata didn't use a function. The point of this kata is to assign to regex a regular expression as a string literal that validates a password according to the description's requirements. Your code should just be something like regex="SOME REGULAR EXPRESSION". If you are not familiar with regular expression, it's more reasonable to learn about it on easier katas. You can make a research with the Regular expressions tag in Practice.

  • Custom User Avatar

    Even if I return False, it writes True should equal False, if I test my code not in codewars, it works, but when I test it there, it doesn't work

  • Custom User Avatar

    You must return the value, not print it (what you print is not taken in consideration by the tests, this is just to help you debugging your code.

  • Custom User Avatar

    What shold I do, if it says True, should equal False, even if I print(False)?

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    I have this problem:

    Traceback (most recent call last):
    File "/workspace/default/.venv/lib/python3.10/site-packages/codewars_test/test_framework.py", line 112, in wrapper
    func()
    File "/workspace/default/tests.py", line 52, in __
    test.assert_equals(from_base_64(s), expected)
    File "/workspace/default/solution.py", line 7, in from_base_64
    a = base64.b64decode(b)
    File "/usr/local/lib/python3.10/base64.py", line 87, in b64decode
    return binascii.a2b_base64(s)
    binascii.Error: Incorrect padding

    What should I do to fix it?