Skip to content

Instantly share code, notes, and snippets.

@Cotopaco1
Created March 16, 2025 03:39
Show Gist options
  • Save Cotopaco1/2ed275b60a09f4c082e52617c922d5ff to your computer and use it in GitHub Desktop.
Save Cotopaco1/2ed275b60a09f4c082e52617c922d5ff to your computer and use it in GitHub Desktop.
Excercise #1 SENA
# Captuar 3 numeros. Si el numero NO es par, no tomarlo en cuenta y seguirle preguntando hasta que
# Complete los 3 numeros pares.
numero1EsImpar = True
## Mientras numero1 no sea par entonces:
while numero1EsImpar == True:
numero1 = int(input("Escribe numero par 1 : "))
numero1EsImpar = (numero1%2 == 1)
#Siguiente linea de codigo
numero2EsImpar = True
while numero2EsImpar == True:
numero2 = int(input("Escribe numero par 2 : "))
numero2EsImpar = (numero2%2 == 1) # true o false
numero3EsImpar = True
while numero3EsImpar == True:
numero3 = int(input("Escribe numero par 3 : "))
numero3EsImpar = (numero3%2 == 1)
resultado = numero1 + numero2 + numero3
print(resultado)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment