8.3 8 Create Your Own Encoding Codehs Answers 〈Hot〉
The CodeHS 8.3.8 Create Your Own Encoding activity requires designing a 5-bit binary representation to map 27 characters, specifically the English alphabet and a space. A valid solution assigns a unique 5-bit code to each letter (e.g., A=00000, B=00001) to meet the minimum bit requirement. For further community discussion and tips, see the conversation on Reddit .
Mistake 1: Not handling spaces or uppercase letters
Course Context:
CodeHS Pro (often "Introduction to Computer Science in Python") Section: 8.3 (Often "Creating and Altering Data Structures" or "Cryptography") Problem Number: 8 Title: Create Your Own Encoding 8.3 8 create your own encoding codehs answers
"secret key"
Some versions of this problem ask for a or "mapping dictionary" that you design yourself. For example: The CodeHS 8
list of integers
| 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. | Mistake 1: Not handling spaces or uppercase letters