Skip to content

Instantly share code, notes, and snippets.

@jessieay
Created June 28, 2012 04:15
Show Gist options
  • Save jessieay/3009033 to your computer and use it in GitHub Desktop.
Save jessieay/3009033 to your computer and use it in GitHub Desktop.
Madlibs funtimes!
puts "Welcome to console mad libs! First you'll enter 21 words, then you'll get a fun story, made by you!"
puts
goodAnswer = false
while (not goodAnswer)
puts "Are you ready to play? Type in 'yes' to begin."
ready = gets.chomp.downcase
if (ready == 'yes')
goodAnswer = true
else
puts
puts "Please enter yes to begin or ctrl c to quit."
puts
end
end
puts "Enter the name of a female in the room:"
word1 = gets.chomp
puts "Enter a number between 1 and 50:"
word2 = gets.chomp
puts "Enter an occupation:"
word3 = gets.chomp
puts "Enter a tool or gadget:"
word4 = gets.chomp
puts "Enter another tool or gadget:"
word5 = gets.chomp
puts "Enter another tool or gadget (no, it's not a bug, it's a feature :) :"
word6 = gets.chomp
puts "Enter the name of a curret male DBC teacher:"
word7 = gets.chomp
puts "Enter a specific job duty:"
word8 = gets.chomp
puts "Enter another specific job duty:"
word9 = gets.chomp
puts "Enter a type of vehicle:"
word10 = gets.chomp
puts "Enter the name of a road, street, or freeway:"
word11 = gets.chomp
puts "Enter an amount of time:"
word12 = gets.chomp
puts "Enter an important destination:"
word13 = gets.chomp
puts "Enter a well-known landmark:"
word14 = gets.chomp
puts "Enter a color:"
word15 = gets.chomp
puts "Enter another color (or the same one, this isn't dictatorship madlibs):"
word16 = gets.chomp
puts "Enter the name of an item of clothing:"
word17 = gets.chomp
puts "Enter a number between 1 and 20. (Rubyists: number > 1 && number < 20):"
word18 = gets.chomp
puts "Enter a number between 5 and 50. (Ruby translation: number !< 5 && number !> 50):"
word19 = gets.chomp
puts "Enter a phrase you'd use at Dev Bootcamp:"
word20 = gets.chomp
puts "Enter the name of a male from the last cohort:"
word21 = gets.chomp
puts "Enter an occupation (note, this is your last word, and thus your last chance to be hilarious):"
word22 = gets.chomp
goodAnswer = false
while (not goodAnswer)
puts "Are you ready for your story? Type in 'yes' to print it out in the console."
ready = gets.chomp.downcase
if (ready == 'yes')
goodAnswer = true
else
puts
puts "Please enter yes or be stuck in limbo FOREVER."
puts
end
end
puts
puts "Here is your story, enjoy!"
puts
puts "You probably all know that #{word1} has worked for #{word2} years as a #{word3}. But what you may not have known is that she often uses a #{word4} and a #{word5} to help her to excel at the job. Naturally, she would't dream of doing her job without #{word6}.
Even more surprisingly, #{word7} has been partnering in this job with #{word1}.Together #{word1} and #{word7} have carried out a wide variety of duties, including #{word8} and #{word9}.
Every morning, #{word1} has an interesting commute. She drives her slick new #{word10} on the #{word11} for about #{word12} to get to work. It takes so long because she always wants to drive by the #{word13} and #{word14}.
Once #{word1} arrives at work, she usually makes quite a splash. Frequently she wears #{word15} eye shadow. Folks always admire her when she wears her favorite #{word16} #{word17}. Our good friend, #{word1}, is a very dedicated worker as you might expect. While she often breaks for coffee every #{word18} minutes, once she worked for #{word19} days in a row, without taking any breaks! When asked why she is so committed to her job, she replied, '#{word20}.' She added, 'When #{word21} was on his deathbed, I was at his side. He made me promise to always work hard. So I'm just keeping that promise.'
Yes, indeed, #{word1} is a fabulous worker. And if you ever need to hire a #{word22}, our gal #{word1} might be just the person you're looking for. She's a woman of many talents!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment