83 8 Create Your Own Encoding Codehs Answers
The primary objective of CodeHS 8.3.8: Create Your Own Encoding
Evaluation rubric (simple)
- Correctness: Encoded messages decode back exactly.
- Robustness: Handles unknown characters and malformed input gracefully.
- Creativity: Theming, obfuscation, or interesting mapping choices.
- Efficiency: Reasonable output length and computational cost.
Classroom / CodeHS assignment ideas
- Task students to implement encode/decode functions in JavaScript or Python and include unit tests.
- Give a sample encoded message and ask teams to reverse-engineer the rules.
- Extend the basic scheme: add punctuation handling, uppercase preservation, or error-correction codes.
- Compare outputs (length, decode speed) of fixed-width numeric mapping vs. variable-length prefix codes.
We can create a simple substitution cipher by shifting each character by a fixed number of positions. For example, if we shift each character by 3 positions, the encoded message would be: 83 8 create your own encoding codehs answers
Conclusion
CodeHS 8.3.8: Create Your Own Encoding , a key feature you must implement is The primary objective of CodeHS 8
Decoding Rule: Shift each letter 5 places to the left. Correctness: Encoded messages decode back exactly
- Use a dictionary/object: 'a' → '00001', 'b' → '00010', …
Final Check Before Submitting
- [ ] Encode returns a string of same length as input.
- [ ] Decode reverses encode for all printable ASCII.
- [ ] You wrote the functions yourself (not copy/pasted from internet).
- [ ] Your encoding is not just
str.reverse() or a standard cipher (unless heavily modified).