Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Cipher Map by Adam_Navarrete
from numpy import*
def recall_password(matriz, clave):
retorn =""
A=[]
for i in matriz:
A.append(list(i))
amatri=array(A)
A=[]
for i in clave:
A.append(list(i))
aclave=array(A)
amatri=amatri=="X"
for i in range(4):
retorn = retorn + "".join(list(aclave[amatri]))
amatri=rot90(amatri, 3)
print(retorn)
return retorn
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'
Jan. 18, 2017
Comments: