Skip to content
Snippets Groups Projects
Commit c3b317b5 authored by Almohamed Alsadou Fatima's avatar Almohamed Alsadou Fatima
Browse files

fonction liste aleatoire

parent a51ebc1b
Branches
No related tags found
No related merge requests found
#[K*n for k in range(0,n)]
from random import *
from random import shuffle
def liste_alea(n:int):
"""
......@@ -8,12 +8,17 @@ def liste_alea(n:int):
Précondition :
Exemple(s) :
$$$ liste_alea(5)
[0,4,3,2,1]
"""
#shuffle(liste) renvoie None
L=[ k for k in range(n)]
return random.shuffle(L)
shuffle(L)
return L
......
......@@ -86,4 +86,12 @@ def main():
$$$
"""
analyser_tri()
\ No newline at end of file
analyser_tri(tri,nbre_essais,taille)
if __name__ == '__main__':
main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment