Skip to content

Instantly share code, notes, and snippets.

@ricardosiri68
Last active December 15, 2015 23:49
Show Gist options
  • Save ricardosiri68/5342560 to your computer and use it in GitHub Desktop.
Save ricardosiri68/5342560 to your computer and use it in GitHub Desktop.
str_numbers = raw_input("ingrese una secuencia de numeros separados por espacios:")
numbers = []
for sn in str_numbers.split():
try:
n = int(sn)
except:
n = 0
numbers.append(n)
def pares(numbers,i = 0):
if len(numbers)-1 >= i:
if numbers[i] % 2 == 0:
print numbers[i]
pares(numbers,i+1)
pares(numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment