Created
September 24, 2015 04:10
-
-
Save kdefliese/7c4e98a18c6f79e2e584 to your computer and use it in GitHub Desktop.
Homework for 9/23
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
hours_per_year = 24 * 365 | |
puts "The number of hours in a year is #{hours_per_year}" | |
mins_per_decade = 60 * 24 * 365 * 10 | |
puts "The number of minutes in a decade is #{mins_per_decade}" | |
age_in_seconds = 60 * 60 * 24 * 365 * 26 | |
puts "I have been alive for about #{age_in_seconds} seconds" | |
authors_age = 1160000000 / 60 / 60 / 24 / 365 | |
puts "The author is about #{authors_age} years old" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice job - your variable names are very logical and you used string interpolation well like
#{hours_per_year}