Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Short version solution in Clear category for Cipher Map by igor.v.dudenko
def recall_password(grill, cypher):
password = ''
for x in grill:
for g_row, c_row in zip(grill, cypher):
password += ''.join(c for g, c in zip(g_row, c_row) if g == 'X')
grill = tuple(zip(*grill[::-1]))
return password
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert recall_password(
('X...',
'..X.',
'X..X',
'....'),
('itdf',
'gdce',
'aton',
'qrdi')) == 'icantforgetiddqd', 'First example'
assert recall_password(
('....',
'X..X',
'.X..',
'...X'),
('xhwc',
'rsqx',
'xqzz',
'fyzr')) == 'rxqrwsfzxqxzhczy', 'Second example'
July 4, 2019