Advertisement
fahadkalil

ordenacao_alunos_2020-2

Nov 5th, 2020
1,956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. ## Criacao dos metodos de ordenacao
  2.  
  3. def bubble_sort(lista):
  4.     pass
  5.     return lista
  6.  
  7. def insertion_sort(lista):
  8.     pass
  9.  
  10.     return lista
  11.  
  12. def selection_sort(lista):
  13.     pass
  14.  
  15.     return lista
  16.  
  17. def menor(lista, inicio=0): # retorna o indice com o menor valor
  18.     pass
  19.    
  20. ## TESTES ##
  21. lista = [5,8,2,1,7]
  22. print(lista)
  23. print(bubble_sort(lista))
  24. print()
  25.  
  26. lista = [5,8,2,1,7]
  27. print(lista)
  28. print(insertion_sort(lista))
  29. print()
  30.  
  31. lista = [5,8,2,1,7]
  32. print(lista)
  33. print(selection_sort(lista))
  34.  
  35.  
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement