All MicroEvals
Complete the following Python function: ```python def encod...
Create MicroEval
Header image for Complete the following Python function:

```python
def encod...

Complete the following Python function: ```python def encod...

Prompt

Complete the following Python function: ```python def encode_shift(s: str): """ returns encoded string by shifting every character by 5 in the alphabet. """ return "".join([chr(((ord(ch) + 5 - ord("a")) % 26) + ord("a")) for ch in s]) def decode_shift(s: str): """ takes as input string encoded with encode_shift function. Returns decoded string. """ ```

Answer guidance

Canonical solution (function body): return "".join([chr(((ord(ch) - 5 - ord("a")) % 26) + ord("a")) for ch in s])