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.
FArekkusu,
No one would use the term 'decimal number' if they intended to be that precise in the first place. A 'decimal number' is most commonly referring to a number with a decimal point. If it's referring to any base-10 number, it's already sort-of wrong even though such numbers are part of the decimal system—we have more accurate terms for that.
Representing it as an accurate picture of how it works is a different problem than whether it is actually an accurate picture of how it works. This is a fine criticism, but you've moved the goalposts. Additionally, the author never said what you've attributed to him (or her) in your quotation. What the author did say seemed accurate (he never said his calculation method was the way it is done), but if it wasn't, it is probably more helpful to point him to a resource that explains it or explain it yourself than to offer unearned condemnation of his kata idea.
Of course, understanding all of this requires some subtlety. It is neither a criticism nor a compliment when I say I don't see you as a particularly subtle person.
Maybe the solution here is to rename the kata "An alternative calculation of Kata Satisfaction."
I normally agree with your criticisms of kata, but yours is an odd post this time.
I agree the phrasing could be made clearer, perhaps by saying something like "All values should be rounded down to the nearest whole number/integer." But even then we are losing the information that the value should not be represented as a decimal.
A "decimal" is very much in the same spirit as 'floating-point number.' A decimal is a representation of any real or integer using a decimal point. A floating-point number is a representation of a decimal number on a computer. Not all languages even use
float
as a type and in Python you can certainly represent such numbers using thedecimal
module."Not an integer" wouldn't work here.
1.0
is a decimal (and floating-point) representation of the integer1
.1.0
is not anint
, but it is an integer.Okay, but what is the actionable take-away from these criticisms? There are a lot of kata that don't work 'how it really works.'
I agree with your other two criticisms. Specifically:
Tests require that the number is specifically rounded down (or floored or truncated). "Rounded to the whole number" is ambiguous.
While the Kata Description does specify that bad input should be ignored, it would be clearer if this requirement specified that four consecutive "Not Satisfied" trigger this excluding bad/ignored input. Relatedly, while the kata only gives bad strings as input, it wouldn't hurt to either make that an official constraint or to test for non-string bad input. (This part is not really an issue, just a suggestion.)
I agree that the Kata Description is ambiguous as to whether the set of complaints is complete. It is not explicitly stated that the set is complete rather than exemplary nor is an implication of the same necessitated by anything in the Kata Description.
That line lambda is great. Nice job!
Thank you for marking this as spoiler for me. I try to remember to use the spoiler flag when possible, but this is a UI issue, not a user issue.
I suggest comments should not be visible from the dashboard by default, should only be visible if the user has access to the solution, or comments to solutions should have the spoiler flag enabled by default, possibly allowing the user to disable it or not.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
^ is bitwise exclusive or
It compares corresponding bits in two numbers. It sets the corresponding bit in the output to 0 if the two corresponding input bits are the same and 1 if the bits are different.
See: https://wiki.python.org/moin/BitwiseOperators
@FArekkusu
I think it's just another way of stating the issue you raised.
Random tests include function definitions which begin with a digit.
Example:
Identifiers in Python, including function names, cannot begin with a digit.
The real reason is that it wasn't changed two years ago when I made the suggestion...
This comment is hidden because it contains spoiler information about the solution
Loading more items...