Пример #1
0
if __name__ == '__main__':
    done = False
    
    while not done :
    
        print ('')
        print ('\033[92m' + "The following lottery games are available: " + '\033[0m')
        print ('')
        print ("quina : show statistics for quina lottery game")
        print ("mega  : show statistics for mega-sena lottery game")
        print ("facil : show statistics for lotofacil lottery game")
        print ("done  : exit the program")
        print ('')
        cmd = raw_input('\033[92m' + 'Choose the game :' + '\033[0m')
        print ('')

        if cmd == 'quina':
            quina = QuinaStats('../data/D_QUINA.HTM')
            quina.screen_interf()
        elif cmd == 'mega':
            sena = SenaStats('../data/d_megasc.htm')
            sena.screen_interf()
        elif cmd == 'facil':
            facil = LotoFacilStats('../data/D_LOTFAC.HTM')
            facil.screen_interf()
        elif cmd == 'done' :
            done = True
        else :
            print ("I don't understand the command " + cmd)
Пример #2
0
        temp = random.randrange(1,60,2) #Impar
        if temp < 10:
            temp = '0'+str(temp)
            if (temp,0) not in result:
                result.append((temp, 0))
        else:
            if (str(temp),0) not in result:
                result.append((str(temp), 0))
    return result

if __name__ == '__main__':

    suggested = []
    start = 100
    end = 1354
    sena = SenaStats('./data/d_megasc.htm', start - 1)
    stat = {'0ac':0, '1ac':0, '2ac':0, '3ac':0, '4ac':0, '5ac':0, '6ac':0}

    # um mesmo numero aleatorio para todos os sorteios
    #result = random_num()

    for ind in range(start, end):
        result = sena.suggest_num(method='Score', for_print=False)
        #result = sena.suggest_num(method='Most Recently', for_print=False)
        #result = sena.suggest_num(method='Least Recently', for_print=False)
        #um numero aleatorio a cada sorteio
        #result = random_num()

        par = 0
        impar = 0
        aux_list = []