[pyar] Quiz II

Alejandro Santos listas en alejolp.com
Dom Oct 31 11:46:17 ART 2010


On Fri, Oct 29, 2010 at 10:07 PM, Alejandro Santos <listas en alejolp.com> wrote:
> Hallar el valor de a:
>
>>>> map(lambda x: f(ord(x)), a)
> [234, 166, 4, 34, 166, 182, 134, 118, 38, 4, 134, 4, 202, 22, 78, 174,
> 70, 70, 166, 78, 158, 132]
>

Para validar si la respuesta es correcta pueden compararla contra:

>>> import hashlib
>>> respuesta = ''.join(map(f, [234, 166, 4, 34, 166, 182, 134, 118, 38, 4, 134, 4, 202, 22, 78, 174, 70, 70, 166, 78, 158, 132]))
>>> hashlib.sha1("da39a3ee5e6b4b0d3255bfef95601890afd80709-" + respuesta + "-7110eda4d09e062aa5e4a390b0a572ac0d2c0220").hexdigest()
'e5ba84a7d4e9187d97b8153057a96767ae0c1373'


-- 
Alejandro Santos
http://alejolp.com.ar



More information about the pyar mailing list