Typo fixes to Encoded Binary to Integer

Various capitalization and punctuation fixes
Changed "Note" to "NOTE" to match other coding contracts. 
Removed "encoded/decoded following hamming's rule" because I couldn't find references to hamming's rule (there are various things called Hamming's Rule, but they didn't seem relevant here). I believe that clause was just emphasizing that the binary string encoded as a hamming code, which we already know?
Rewrote the "return" text to include it should be a string. 
*NOTE 4 could be removed, or kept for redundancy's sake
*"So MAYBE there is an altered bit" is also redundant, since note 3 already says a 55% chance, which means "maybe." Left, but could be removed.
This commit is contained in:
ActuallyCurtis 2022-04-15 00:34:50 -07:00 committed by GitHub
parent ddee44df4a
commit 4b3694d806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1281,14 +1281,15 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
numTries: 10, numTries: 10,
desc: (n: string): string => { desc: (n: string): string => {
return [ return [
"You are given the following encoded binary String: \n", "You are given the following encoded binary string: \n",
`'${n}' \n`, `'${n}' \n`,
"Treat it as a Hammingcode with 1 'possible' error on an random Index.\n", "The string is a Hamming code with 1 'possible' error on a random index.\n",
"Find the 'possible' wrong bit, fix it and extract the decimal value, which is hidden inside the string.\n\n", "If there is an error, find the bit that is an error and fix it.\n",
"Note: The length of the binary string is dynamic, but it's encoding/decoding is following Hammings 'rule'\n", "Extract the encoded decimal value and return a string with that value.\n\n",
"Note 2: Index 0 is an 'overall' parity bit. Watch the Hammingcode-video from 3Blue1Brown for more information\n", "NOTE: The length of the binary string is dynamic.\n",
"Note 3: There's a ~55% chance for an altered Bit. So... MAYBE there is an altered Bit 😉\n", "NOTE 2: Index 0 is an 'overall' parity bit. Watch the Hamming code video from 3Blue1Brown for more information.\n",
"Extranote for automation: return the decimal value as a string", "NOTE 3: There's approximately a 55% chance for an altered bit. So... MAYBE there is an altered bit 😉\n",
"NOTE 4: Return the decimal value as a string.",
].join(" "); ].join(" ");
}, },
gen: (): string => { gen: (): string => {