algo
Publié le 22/05/2020
Extrait du document
« #!/usr/bin/python3# -*- coding: utf-8 -*-"""Documentation dece module"""# fichier: algorithme de tri par selection# auteur: Vignau Benjamin# date : 26.01.14 # ---------- imports ----------from math import *# ---------- Programme Principal ----------L = [5,8,9,4,1]L2 = []n = len(L)while n > 0 : a = min(L) L2.insert(4, a) L.remove(a) n = n-1 print(L)print(L2) """--------------------RESULTATS----------------- [][1, 4, 5, 8, 9] """. »
↓↓↓ APERÇU DU DOCUMENT ↓↓↓