Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Cipher Map by mikaeldovbnia
def recall_password(c, m):
r = []
for a in range(4):
for i in zip(c, m):
for i, d in zip(*i):
if i == 'X':
r.append(d)
c = list(zip(*c[::-1]))
return ''.join(r)
if __name__ == '__main__':
print("Example:")
print(recall_password(['X...', '..X.', 'X..X', '....'],
['itdf', 'gdce', 'aton', 'qrdi']))
# These "asserts" are used for self-checking and not for an auto-testing
assert recall_password(['X...', '..X.', 'X..X', '....'],
['itdf', 'gdce', 'aton', 'qrdi']) == 'icantforgetiddqd'
assert recall_password(['....', 'X..X', '.X..', '...X'],
['xhwc', 'rsqx', 'xqzz', 'fyzr']) == 'rxqrwsfzxqxzhczy'
print("Coding complete? Click 'Check' to earn cool rewards!")
May 29, 2022
Comments: