Last active
December 15, 2015 23:49
-
-
Save ricardosiri68/5342560 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
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