Fix: Ensure all skills are tracked as files, not submodules
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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.
|
||||
"""
|
||||
return "".join([chr(((ord(ch) - 5 - ord("a")) % 26) + ord("a")) for ch in s])
|
||||
Reference in New Issue
Block a user