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.
The name
object
is already used by theobject
classYou're checking whether lives is 0, but what if it is -1, -2 or ...
fixed
I have so many trouble because of this new features of python, and I wanna evaluate how much I know about the last 2 versions too, because we gonna need to use anyway bolt. Great wise words man! Congrats, make me an ally!
Read Erynvorn's post below.
Python:
I'm raising the error on the right moment, when lives == 0. I've tried:
raise Error('Omae wa mo shindeiru')
raise ValueError('Omae wa mo shindeiru')
raise Exception('Omae wa mo shindeiru')
None of this seems to work. What am I missing?
For Python making the method a static method is not required!!!
Also there should be a better explanation about the standard output. People think return also prints.
For 8 Kyu let it be a bit more educational. Now it is more like a trick question and judging from the responses everybody is gets just pissed of by it.
allow people to succeed, don't set them up to fail.
Okay, three months later now.
I finally solved it. Anyone struggling: Google 'swap in place python'. If you tried args[::-1] you are thinking too advanced.
It appears a 'return' function is not required. This puzzled me.
If bonus is False, its index value is 0
consider:
array = ['a', 'b']
bonus = True
array[bonus] == array[1] == 'b'
bonus = False
array[bonus] == array[0] == 'a'
You sure you fixed it? This is wat the interpreter gives back to me. How is this wrong?
Test Results:
Log
args = [1, 2]
sgra = [2, 1]
[1, 2] should equal [2, 1]
Even if I give it [2, 1,] typed by hand, it still says it is wrong.
done (but well, the function is already provided so...)
see my comment
Python:
There is a typo in the description. It says 'create a function named (...???...) that calls' The name of the function is missing. I figured it out, but this could have been potentially very frustrating and it not the skill you want to test from your users at 8 kyu level.
Item order doesn't affect equality and there's no result order requirement here.
So, almost trew my computer out of the window. 'set' in Python 3 scrambles the letters differently everytime I run it. For Python 2 it is stable. And I finally know where the order is coming from.
This problem should be limtited to Python 2 only.
Loading more items...