Exemple #1
0
def encode_create_wordspace(cookie):
    #f = open('words.txt','r')
    f = words_list.abcd()
    alphabet = []
    cookie_count = 1
    for q in f:
        if cookie_count == cookie:
            key = q.strip()
        if (cookie_count >= cookie) and (cookie_count < (66 + cookie)):
            alphabet.append(q.strip())
        cookie_count = cookie_count + 1
    return (alphabet, key)
Exemple #2
0
def encode_create_wordspace(cookie):
    #f = open('words.txt','r')
    f = words_list.abcd()
    alphabet = []
    cookie_count = 1
    for q in f:
        if cookie_count == cookie:
                key = q.strip()
        if (cookie_count >= cookie) and (cookie_count < (66 + cookie)):
                alphabet.append(q.strip())
        cookie_count = cookie_count + 1
    return (alphabet,key)
Exemple #3
0
def decode_create_wordspace(key):
    cookie_count = 1
    words = []
    #f = open('words.txt','r')
    f = words_list.abcd()
    for zz in f:
        words.append(zz.strip())

    for y in words:
        y = y.strip()
        if y == key:
            cookie = cookie_count
            break
        cookie_count = cookie_count + 1

    alphabet = []
    cookie_count = 1
    for q in words:

        if (cookie_count >= cookie) and (cookie_count < (66 + cookie)):
            alphabet.append(q.strip())
        cookie_count = cookie_count + 1
    #f.close()
    return alphabet
Exemple #4
0
def decode_create_wordspace(key):
        cookie_count = 1
        words = []
        #f = open('words.txt','r')
	f = words_list.abcd()
        for zz in f:
                words.append(zz.strip())
        
        for y in words:
                y = y.strip()
                if y == key:
                        cookie = cookie_count
                        break
                cookie_count = cookie_count + 1
        
        alphabet = []
        cookie_count = 1
        for q in words:

                if (cookie_count >= cookie) and (cookie_count < (66 + cookie)):
                        alphabet.append(q.strip())
                cookie_count = cookie_count + 1
        #f.close()
        return alphabet