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
#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'] |
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
# 1. Returns the elements at even positions | |
# a = [5,6,7,3] | |
# => [5,7] (5 at index 0, 7 at index 2) | |
# 2. Calculate the fibonaci at n th (1,1,2,3) | |
# fibonaci(2) => 1 | |
# fibonaci(4) => 3 | |
# 3. Count how many number 4 in array |
NewerOlder