Skip to content

Instantly share code, notes, and snippets.

@itskaia
Created March 31, 2019 22:24
Show Gist options
  • Save itskaia/199a4296726ce7d50a447a14e3ed11a1 to your computer and use it in GitHub Desktop.
Save itskaia/199a4296726ce7d50a447a14e3ed11a1 to your computer and use it in GitHub Desktop.
Do The Things
activities_I_do = [
"climb",
"study",
"read",
"text mom",
"email dad",
"socialize IRL"
]
score_card = []
activity_slot = 0
while true
puts "Did you #{activities_I_do[activity_slot]} today? [y/n]"
activity_slot = activity_slot + 1
activity_done = $stdin.gets.chomp
if activity_done == 'y' || activity_done == 'Y'
score_card.push(1)
end
score_card_total = score_card.reduce{|x,y|x+y}
if activity_slot >= 6
puts "Daily score: #{score_card_total}"
break
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment