Failing test on a unicode character - probably worth mentioning that the comment marker may be unicode, especially in python as current codewars version of python (2.7) has poor unicode support. I also think quite a few people won't expect a unicode comment marker.
Yea, they're initiating correctly. My guess is that you're trying to refer to a global variable instead of encapsulating the key and alphabet in the constructor.
Finding some really weird things going with this in python. I have a script that works perfectly when run in python 3.4, but the tests retrun all sorts of strange errors. Doing a little playing I note that python here versus on the desktop executes some math slightly differently for example var = tn/n where tn=1 and n=3 as integers in python on my workstation var=0.3333333333, here it returns 0.
I think this is the first test that uses a unicode marker - might want to check your solution handles unicode?
Failing test on a unicode character - probably worth mentioning that the comment marker may be unicode, especially in python as current codewars version of python (2.7) has poor unicode support. I also think quite a few people won't expect a unicode comment marker.
Yea, they're initiating correctly. My guess is that you're trying to refer to a global variable instead of encapsulating the key and alphabet in the constructor.
Python - my code works in the initial tests, but on hitting submit:
Testing with lowercase latin alphabet
Password of 'password'
Traceback:
in
in encode
NameError: global name 'key' is not defined
Are the tests initiating the test data correctly?
No problem. I'm hoping that Codewars will support Python 3 in the future.
Also, when you click
Train
on a kata it says "Supported Python version is 2.7.6" at the bottom of theInstructions
tab.That was what I wondered, I just failed to find a reference to the environment set up. I'll adjust and see if I can fix. Thanks!
Could it be because Codewars uses Python 2.7?
http://www.codewars.com/docs/python-environment
http://www.informit.com/articles/article.aspx?p=1439189
Finding some really weird things going with this in python. I have a script that works perfectly when run in python 3.4, but the tests retrun all sorts of strange errors. Doing a little playing I note that python here versus on the desktop executes some math slightly differently for example var = tn/n where tn=1 and n=3 as integers in python on my workstation var=0.3333333333, here it returns 0.