Skip to content

Instantly share code, notes, and snippets.

@kat-perreira
Last active May 31, 2018 04:04
Show Gist options
  • Save kat-perreira/93d6a943d988aa821b7aafcda9fa7aa2 to your computer and use it in GitHub Desktop.
Save kat-perreira/93d6a943d988aa821b7aafcda9fa7aa2 to your computer and use it in GitHub Desktop.
Superhero Madlibs created by kaimana_Cat - https://repl.it/@kaimana_Cat/Superhero-Madlibs
#This is a practice for Ruby Lesson 9 in the Ada Jumpstart program
puts "Welcome to SuperHero MadLibs!"
puts "Please tell me your name:"
User = gets.chomp
puts
puts
puts "Hello " + User + ", please choose the following: "
#Collect Variables for Story
puts
print "City: "
city = gets.chomp
puts
print "Superhero: "
superhero = gets.chomp
puts
print "Restaurant: "
restaurant = gets.chomp
puts
print "Villian: "
villian = gets.chomp
puts
print "Sling an insult: "
insult = gets.chomp
puts
print "Number higher than 1: "
number = gets.chomp
puts
print "Food, singular: "
food = gets.chomp
puts
print "Body part: "
body = gets.chomp
#Header
puts
puts
puts
puts
puts "*******HERE IS YOUR MADLIB********"
puts
puts
puts
#Use Variables to fill in parts of the story
puts "Somewhere in "+ city + ", " + superhero + " and " + User +
" are having lunch at " + restaurant + "."
puts "All of a sudden, " + villian + " bursts thru the door."
puts villian + ": " + insult
puts superhero + ": " + villian + "! Get Lost or you will regret it!"
puts villian + ": Make me!"
puts superhero + " grabs " + number + " " + food + "s and hurls it at " + villian + "'s " + body + "!"
puts villian + " is stunned: Alright, I surrender!!!"
puts villian + " leaves " + restaurant + " and " + superhero + " and " +
User + " continue their "+ food + "-less meal in peace."
puts "The End"
#Pat myself on the back and grab a cookie to celebrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment