TP4 creerListeRecherche

Originellement fait pendant la séance
This commit is contained in:
Geoffrey Frogeye 2015-02-24 13:59:42 +01:00
parent 76bb633de9
commit 67527aa172

View file

@ -118,12 +118,10 @@ squestion('b') # Effectuer de nombreuses recherches dans LEXIQUE
# algorithmes utilisés
# Définition des éléments choisis pour la recherche
from random import randint
NB_ELEMENTS = 10
elements = list()
taille = len(LEXIQUE)
for n in range(NB_ELEMENTS):
elements.append(LEXIQUE[randint(0, taille)])
#
def creerListeRecherche(l, dans, hors):
elements = list()
taille = len(LEXIQUE)
for n in range(dans):
elements.append(LEXIQUE[randint(0, taille)])
return elements