Created
November 19, 2010 02:58
-
-
Save dokipen/706070 to your computer and use it in GitHub Desktop.
Home value appreciation
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
$PER_YEAR = 1.07 | |
def appreciate(value, years) | |
return value if years == 0 | |
appreciate(value * $PER_YEAR, years - 1) | |
end | |
# my home was sold for 52k in 95' | |
puts appreciate(52000, 16) | |
# >> 153512.514925401 | |
# OK.. Only 6k underwater! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment