Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Speedy category for Cipher Map by Jaime
def recall_password(cipher_grille, ciphered_password):
doy=''
for rec in range(0,4):
for x,xx in zip(cipher_grille,ciphered_password):
for y,yy in zip(x,xx):
if y=='X':doy+=yy
rotado = list(zip(*cipher_grille[::-1]))
cipher_grille=rotado
return doy
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'
Aug. 13, 2018
Comments: