Last active
December 31, 2015 16:39
-
-
Save mikeadeleke/8014624 to your computer and use it in GitHub Desktop.
99 bottles
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
def bottle_song(i) | |
while i > 2 | |
puts "#{i} bottles of beer on the wall, #{i} bottles of beer. " | |
puts "Take one down, pass it around, #{i - 1} bottles of beer on the wall!" | |
i = i - 1 | |
end | |
puts "2 bottles of beer on the wall, 2 bottles of beer." | |
puts "Take one down, pass it around. 1 bottle of beer on the wall!" | |
puts "1 bottle of beer on the wall, 1 bottle of beer." | |
puts "Take one down, pass it around. No more bottles of beer on the wall!" | |
end | |
bottle_song(99) |
We're making progress, Mike. Let's punt on the rest until our session, as there are several things we should talk about that are kind of intertwined. Cool?
Great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just updated! I am curious to know what is "driver code". I've been having problems running it as well.