Skip to content

Instantly share code, notes, and snippets.

@dinhhuydh
Created December 3, 2017 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dinhhuydh/c1edba0b6f0fa6126659d1f5dda79759 to your computer and use it in GitHub Desktop.
Save dinhhuydh/c1edba0b6f0fa6126659d1f5dda79759 to your computer and use it in GitHub Desktop.
#1. sum of even numbers
# count_even(a)
# [1,2,3] => 2
# [1,2,4] => 6
# 2. Return names with 'H' at first letter
# ['Haa', 'aa', 'kkk] => ['Haa']
# 3. check if a number is prime
# prime(5) => true
# prime(4) => false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment