Skip to content

Instantly share code, notes, and snippets.

@konchunas
Last active February 15, 2019 21:10
Show Gist options
  • Save konchunas/1e86df2454ebc3a595dabab1e1dfd382 to your computer and use it in GitHub Desktop.
Save konchunas/1e86df2454ebc3a595dabab1e1dfd382 to your computer and use it in GitHub Desktop.
def has_even(numbers):
for num in numbers:
if num % 2 == 0:
return True
return False
def main():
vec = [1,9,2,5,4]
even_exists = has_even(vec)
print("Has even number", even_exists)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment