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.
Yeah, I initially wanted to use
Word
, but changed toInt
and forgot to update theInitial solution
.Fixed.
added
Type issue in the test suite?
test/CalculateParityBitSpec.hs:18:105: error:
• Couldn't match expected type ‘Int’ with actual type ‘Word’
• In the third argument of ‘assertEqual’, namely
‘(checkParity parity string)’
In a stmt of a 'do' block:
assertEqual
("checkParity " <> show parity <> " " <> show string)
(refCheckParity parity string) (checkParity parity string)
In the expression:
do assertEqual
("checkParity " <> show parity <> " " <> show string)
(refCheckParity parity string) (checkParity parity string)
|
18 | assertEqual ("checkParity " <> show parity <> " " <> show string) (refCheckParity parity string) (checkParity parity string)
|
^^^^^^^^^^^^^^^^^^^^^^^^^
Haskell translation
Approved
Rust translation
just wanted to say im happy i can finally do this mathematically instead of with guesswork
Missing return type in initial solution setup of TS
COBOL translation (author is inactive).
Approved :)
C translation (author inactive)
Not a kata suggestion (Exchanging solutions are not encouraged when one has not solved the kata yet!!)
You're reading the logs wrong, the log appears above the test result. And the parity of the decimal representation of the number doesn't matter, this is about the number of 1s in the string. Just add the number (1 or 0) at the end. If you check the Wikipedia link in the kata description, it is explained.
what it's mean, the testing number is 111010010, it's even right (466).
But the question is (odd 111010010).
So the answer must be 0 (false).
But the test want me to get the answer of 1 (true)
How to get it?
i mean, where i need to put another 1?
Loading more items...