# Practice Coding Exercise

## lucky_sevens?

Write a function `lucky_sevens?(numbers)`, which takes in an array of integers and returns true if any three consecutive elements sum to 7.

``````lucky_sevens?([2,1,5,1,0]) == true # => 1 + 5 + 1 == 7
lucky_sevens?([0,-2,1,8]) == true # => -2 + 1 + 8 == 7
lucky_sevens?([7,7,7,7]) == false
lucky_sevens?([3,4,3,4]) == false
``````

Make sure your code correctly checks for edge cases (i.e. the first and last elements of the array).

My solution: ## oddball_sum

Write a function `oddball_sum(numbers)`, which takes in an array of integers and returns the sum of all the odd elements.

``````oddball_sum([1,2,3,4,5]) == 9 # => 1 + 3 + 5 == 9
oddball_sum([0,6,4,4]) == 0
oddball_sum([1,2,1]) == 2
``````

My solution:

## disemvowel

Write a function `disemvowel(string)`, which takes in a string, and returns that string with all the vowels removed. Treat “y” as a consonant.

``````disemvowel("foobar") == "fbr"
disemvowel("ruby") == "rby"
disemvowel("aeiou") == ""``````

My solution: I did these with 26 mins remaining on the clock! (I was given 45min total.)