Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
CipherMap solution in Clear category for Cipher Map by Seaclaid
def recall_password(ci_g, ci_p):
password=''
tempci_g=ci_g
for i in range(4):
password=password+jedenbok(tempci_g,ci_p)
tempci_g=obrot(tempci_g)
print(password)
return password
def obrot(cgrille):
a,b,c,d=cgrille
tempg=[a,b,c,d]
tempbase=['....','....','....','....']
for x in range(4):
tempbase[x]=d[x]+c[x]+b[x]+a[x]
newg=(tempbase[0],tempbase[1],tempbase[2],tempbase[3])
return newg
def jedenbok(cg, cp):
temp_cg=''
temp_cp=''
pword=''
temp_new_cg=''
new_cg=('1234','5678','9abc','defg')
for i in range(4):
kod=-1
temp_cp=cp[i]
temp_cg=cg[i]
if 'X' in cg[i]:
for z in range(4):
if temp_cg[z]=='X':
kod=z
pword=pword+temp_cp[kod]
return pword
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. 7, 2017