-
-
Save parzibyte/5a9798a9fed9ac6db60401568c14dac7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vamos a poner los números en una lista | |
numeros = [] | |
# Le agregamos 3 números | |
for i in range(3): | |
numero = float(input("Introduce el número #{}: ".format(i + 1))) | |
numeros.append(numero) | |
# Asumir que el menor es el primero de la lista | |
menor = numeros[0] | |
# Recorrer y comparar | |
for numero in numeros: | |
if numero < menor: | |
menor = numero | |
# Imprimir el resultado | |
print("Menor:", menor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment