Skip to content

Instantly share code, notes, and snippets.

puts "We're going to make a random menu generator!"
puts "To begin with, how many menu items would you like to consider? "
consider = gets.chomp.to_i
puts "OK, let's get going. You're going to write #{consider} adjectives, #{consider} ways of cooking, and #{consider} foods."
adjectives = []
consider.times do |num|
puts "Hours in a year: #{365 * 24}"
puts "Minutes in a decade: #{10 * 365 * 24 * 60}"
# I'm about 27 years + 8 months old. First calculated 27 years, 365 days in a year,
# 24 hours in a day, 60 minutes in an hour, 60 seconds in a minute PLUS, to add the
# months I've so far lived this year, I did 8 months, 31 days in a month, 24 hours
# in a day, 60 minutes in an hour, 60 seconds in a minute
puts "My age in seconds: #{(27 * 365 * 24 * 60 * 60) + (8 * 31 * 24 * 60 * 60)}"