Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Cipher Map by PawelBubak
def obracanie(array):
o = 1
tab = [[o,o,o,o],[o,o,o,o],[o,o,o,o],[o,o,o,o]]
for i in range(0,4):
for j in range(0,4):
tab[j][3-i]=array[i][j]
return tab
def tworzenie(napis):
list = []
for i in napis:
l = []
for j in i:
l.append(j)
list.append(l)
return list
def recall_password(cipher_grille, ciphered_password):
algorytm = tworzenie(cipher_grille)
kod = tworzenie(ciphered_password)
result = ''
for k in range(0,4):
for i in range(0,4):
for j in range(0,4):
if algorytm[i][j] == 'X':
result = result + kod[i][j]
algorytm = obracanie(algorytm)
return result
Nov. 27, 2016