Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 9, 2020 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/6bdc3e64faddaf4d83a3779665646718 to your computer and use it in GitHub Desktop.
Save parzibyte/6bdc3e64faddaf4d83a3779665646718 to your computer and use it in GitHub Desktop.
# Ahora ya tenemos los 3 números, vamos a ordenarlos con el método de la burbuja
for i in numeros:
for j in range(len(numeros) - 1):
if numeros[j] > numeros[j+1]:
numeros[j], numeros[j+1] = numeros[j+1], numeros[j]
# Ya están ordenados. Los imprimimos
for numero in numeros:
print(numero)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment