8.3 8 Create Your Own Encoding Codehs Answers Upd Jun 2026

The 8.3.8 assignment in CodeHS challenges students to go beyond standard encoding methods (like ASCII or Morse code) and design their own or mapping system.

| Mistake | Why It Happens | Fix | |---------|----------------|-----| | Forgetting to handle spaces | Space ( ' ' ) has ASCII 32. After shift, it becomes 37, which is '%' . Your decode must reverse correctly. | Test with "a b" to ensure spaces survive round-trip. | | Using a non-reversible rule | Example: multiplying by 2. Two different chars (like 'a'=97 and 'b'=98) could map to same number after mod. | Always use a bijective (one-to-one) rule. Addition/subtraction works perfectly. | | Returning a string instead of list | The prompt explicitly asks for a . | Use encoded_list.append(...) and return the list. |

) and a space, assigning them in order from binary 00000 up to 11001 for 8.3 8 create your own encoding codehs answers

The exercise on CodeHS isn't about finding a secret answer—it's about mastering the concept of transforming data. The solution above gives you a working, autograder-friendly implementation while teaching you how ord() and chr() form the backbone of text encoding.

Early image file formats, such as BMP and PCX, utilized variations of Run-Length Encoding to compress uniform blocks of pixels (like a solid white background) into tiny file sizes. Your decode must reverse correctly

Before shifting, reverse the entire message.

This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later. Two different chars (like 'a'=97 and 'b'=98) could

The great insight of ASCII is that every character is represented with (later extended to 8 bits in Extended ASCII). While this is simple and widely supported, it is not necessarily efficient. The letter Z takes the same number of bits as the letter E , even though E is much more common in English text.

decode_map = '0': 'A', '1': 'B', '00': 'C', ...

If the decoding function receives a binary string that contains an unrecognized code, the program may crash or produce garbage output. Including a fallback (like printing ? ) prevents crashes and helps you debug.

You can assign your 5-bit sequences in any order, but a sequential approach is the easiest to track. Binary Code Binary Code 00000 N 01101 B 00001 O 01110 C 00010 P 01111 D 00011 Q 10000 E 00100 R 10001 F 00101 S 10010 G 00110 T 10011 H 00111 U 10100 I 01000 V 10101 J 01001 W 10110 K 01010 X 10111 L 01011 Y 11000 M 01100 Z 11001 Space 11010 Example Application