forked from jaguardesignstudio/developer-exercise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise.rb
More file actions
18 lines (15 loc) · 658 Bytes
/
Copy pathexercise.rb
File metadata and controls
18 lines (15 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Exercise
# Assume that "str" is a sequence of words separated by spaces.
# Return a string in which every word in "str" that exceeds 4 characters is replaced with "marklar".
# If the word being replaced has a capital first letter, it should instead be replaced with "Marklar".
def self.marklar(str)
# TODO: Implement this method
end
# Return the sum of all even numbers in the Fibonacci sequence, up to
# the "nth" term in the sequence
# eg. the Fibonacci sequence up to 6 terms is (1, 1, 2, 3, 5, 8),
# and the sum of its even numbers is (2 + 8) = 10
def self.even_fibonacci(nth)
# TODO: Implement this method
end
end