Created
March 3, 2018 04:33
-
-
Save kat-perreira/77923f90219fd28184b8aed6a77d5350 to your computer and use it in GitHub Desktop.
99 Bertie Botts Beans in a bag created by kaimana_Cat - https://repl.it/@kaimana_Cat/99-Bertie-Botts-Beans-in-a-bag
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
=begin | |
write a program that prints lyrics to 99 bottles of beer on the wall | |
Make it Harry Potter Themed | |
=end | |
puts "Hello, would you like to take the Bertie Bots Every Flavor Bean Challange?" | |
print "Y or N:" | |
answer = gets.chomp | |
if answer == "Y" | |
99.downto(0) { |n| puts n, " Bertie Botts Beans in a bag! " | |
print n, " Bertie Botts Beans in a bag, " | |
print n, " Bertie Botts Beans! Take one down, try not to gag, " | |
if n ==0 | |
puts "No more Bertie Botts Beans in a bag!" | |
end | |
} | |
puts | |
puts | |
puts | |
puts "Congratulations, You survied the Bertie Botts Beans Challenge" | |
else | |
puts "Ok, see you later!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment