Skip to content

Instantly share code, notes, and snippets.

@cupofjoey
Created April 29, 2015 01:26
Show Gist options
  • Save cupofjoey/f21d4003046670355e94 to your computer and use it in GitHub Desktop.
Save cupofjoey/f21d4003046670355e94 to your computer and use it in GitHub Desktop.
Launch Academy Week 1 Exercise
knife = 2.1 + 5 + 1 + 3 + 0.77
puts "Knife Juggling:"
puts knife
torch = 6 + 3.5 + 7
puts "Torch Juggling:"
puts torch
hand = 2 + 1
puts "Hand Balancing:"
puts hand
block = 0.75 + 0.43
puts "Human Blockhead:"
puts block
total = knife + torch + hand + block
puts total
puts "Knife Juggling: " + knife.to_s + " Avg. Tip: " + (knife/5).to_s
puts "Torch Juggling: " + torch.to_s + " Avg. Tip: " + (torch/3).to_s
puts "Hand Balancing: " + hand.to_s + " Avg. Tip: " + (hand/2).to_s
puts "Human Blockhead: " + block.to_s + " Avg. Tip: " + (block/2).to_s
puts "Hello everyone! Today, my assistant will be showing you acts that you will not believe! But first, we need a volunteer! Can we have your name good volunteer?"
name = gets.chomp
puts "Greetings " + name + "! " + "Please give " + name +" a round of applause! Now, " + name + " can you tell us your favorite number?"
number = gets.chomp
puts "Alright, " + name + " my assistant and I will be juggling these knives around you for " + number + " seconds. Are you prepared to be amazed?!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment