[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/vt/ - Virtual YouTubers


Thread archived.
You cannot reply anymore.

83 8 create your own encoding codehs answers

[Advertise on 4chan]


Creating Your Own Encoding: A CodeHS Exploration

Let's create a simple substitution cipher as an example solution for the 83.8 create your own encoding CodeHS exercise.

If you read one character at a time, you would see '^' , not find it in the map, and break. By checking 2 characters first, you correctly capture '^e' and decode it to 'e' .

// Define the Mapping var encodingMap = "A": "00001", "B": "00010", "C": "00011", "D": "00100", "E": "00101", "F": "00110", "G": "00111", "H": "01000", "I": "01001", "J": "01010", "K": "01011", "L": "01100", "M": "01101", "N": "01110", "O": "01111", "P": "10000", "Q": "10001", "R": "10010", "S": "10011", "T": "10100", "U": "10101", "V": "10110", "W": "10111", "X": "11000", "Y": "11001", "Z": "11010", " ": "11111" ;

return output;

Beyond CodeHS: Real-World Applications

The Official CodeHS 8.3.8 Answer (JavaScript)

Pick one you fully understand.


[Advertise on 4chan]

Delete Post: [File Only] Style:

83 8 Create Your Own Encoding Codehs Answers

Creating Your Own Encoding: A CodeHS Exploration

Let's create a simple substitution cipher as an example solution for the 83.8 create your own encoding CodeHS exercise.

If you read one character at a time, you would see '^' , not find it in the map, and break. By checking 2 characters first, you correctly capture '^e' and decode it to 'e' . 83 8 create your own encoding codehs answers

// Define the Mapping var encodingMap = "A": "00001", "B": "00010", "C": "00011", "D": "00100", "E": "00101", "F": "00110", "G": "00111", "H": "01000", "I": "01001", "J": "01010", "K": "01011", "L": "01100", "M": "01101", "N": "01110", "O": "01111", "P": "10000", "Q": "10001", "R": "10010", "S": "10011", "T": "10100", "U": "10101", "V": "10110", "W": "10111", "X": "11000", "Y": "11001", "Z": "11010", " ": "11111" ; Creating Your Own Encoding: A CodeHS Exploration

return output;

Beyond CodeHS: Real-World Applications

The Official CodeHS 8.3.8 Answer (JavaScript)

Pick one you fully understand.