It's more like a 7 kyu.
many thanks
I just added a quick fix so this shouldn't happen anymore. But it appears that you solved it already anyway :p
Many thanks - very helpful!
Oh yikes, the tests for Python are really bad: they crash on any error coming from your code (thinking you wrote a Translator class instead)
For sample tests, you can modify the tests. Change the except clause:
except
except Exception as e: print(e) # / raise e. This will print the actual error coming from your code ordering_beers = lambda n: Translator().ordering_beers(n)
With this you'll see that the mistake is on line 6: if beers = 1
if beers = 1
Your code uses the translate module, which is not installed on Codewars.
translate
When clicking test, I get a NameError thrown up for line 5 of the sample test code - "NameError: name 'Translator' is not defined".
How do I resolve this?
Much too easy for 5 kyu!
Loading collection data...
It's more like a 7 kyu.
many thanks
I just added a quick fix so this shouldn't happen anymore. But it appears that you solved it already anyway :p
Many thanks - very helpful!
Oh yikes, the tests for Python are really bad: they crash on any error coming from your code (thinking you wrote a Translator class instead)
For sample tests, you can modify the tests. Change the
except
clause:With this you'll see that the mistake is on line 6:
if beers = 1
Your code uses the
translate
module, which is not installed on Codewars.When clicking test, I get a NameError thrown up for line 5 of the sample test code - "NameError: name 'Translator' is not defined".
How do I resolve this?
Much too easy for 5 kyu!