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.
So, this kata just doesn't apply to the Python language - do I get that correctly? Sorry for the trouble. I am just confused. I kind of see why it wouldn't apply to Python because I didn't translate the kata as it is, but changed a part of it.
What translation?
I'm awfully tempted to take the liberty of pressing that red reject button. Both the problem and the solution doesn't apply to python. It does not translate. This translation shouldn't exist.
"In Python, strings are provided instead of bytes, as Python lacks a 'byte' data type, unlike some other programming languages."
The modified paragraph provides a brief explanation of why Python uses strings instead of bytes, making it clearer for readers who may not be familiar with the differences in data types between programming languages. This additional clarity enhances the informativeness of the text.
Oops, I'll mark this as solved then. :
those are swapped, as already reported below (years ago)
area_code
: Returns an area code from the number. The area code will be 3 digits.Yeah, sure.
I'm not extremely sure what's wrong here, though. It may be that
expected
andactual
are swapped, or it's just that the kata is broken.Tests are not actually displaying the expected answer.
'1234567890' should equal <bound method Phone.number of <solution.Phone object at 0x7fa358dfd5e0>>
Please fix.
Marking it as solved, already did both.
Marking it as solved because it's no longer in the kata.
Added
The value it returns is
b
, of course, but the reference it returns isa
. This matters ifa
is an object or a property of one.I can't tell you offhand why your solution isn't working; possibly the mechanism is different within a setter. But, frankly, I think that's your problem. If I knew, I would gladly tell you, but seeing as I don't, I'm not making your problem mine. Both Alex' and my solution handle this correctly, as far as I can see, so it's not impossible.
Not sure how this would be possible, I tried to return the expression itself but that doesn't work.
Also,
a = b
returnsb
and notundefined
, or am I missing something?Fixed the description.
a = b
should returna
( with its new value ) in JS. The reference solution doesn't seem to do this and I haven't checked if this is tested. Existing programs sometimes rely on this; it is not good practice to returnundefined
for this expression even if the side effect is handled correctly.Loading more items...