Created
April 5, 2016 23:43
-
-
Save mlabisi/3d863ab474784b55a082666665803f50 to your computer and use it in GitHub Desktop.
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 answers(one, two, three, four, five) | |
puts "I once #{one} a snake. It was lots of fun." | |
puts "It's hard to go water skiing when you don't have #{two}!" | |
puts "The longest time she's gone without showering is #{three} days..." | |
puts "Ever since I was young, I've always wanted a pet #{four}." | |
puts "Learning Ruby is #{five}!" | |
end | |
puts "Welcome to MadLibs: Ruby Edition!" | |
puts "Press RETURN to begin and CTRL-C (^C) to quit!" | |
$stdin.gets.chomp | |
print "verb (past tense): " | |
verb = $stdin.gets.chomp | |
print "body part (plural): " | |
body_part = $stdin.gets.chomp | |
print "number: " | |
number = $stdin.gets.chomp | |
print "animal: " | |
animal = $stdin.gets.chomp | |
print "adjective: " | |
adjective = $stdin.gets.chomp | |
puts "Creating sentences..." | |
puts "\n" | |
puts "Here are your results:" | |
answers(verb, body_part, number, animal, adjective) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment