Skip to content

Instantly share code, notes, and snippets.

@kdefliese
Created September 24, 2015 04:10
Show Gist options
  • Save kdefliese/7c4e98a18c6f79e2e584 to your computer and use it in GitHub Desktop.
Save kdefliese/7c4e98a18c6f79e2e584 to your computer and use it in GitHub Desktop.
Homework for 9/23
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"
@kariabancroft
Copy link

Nice job - your variable names are very logical and you used string interpolation well like #{hours_per_year}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment