def calcer
  puts "|----------|"
  puts "|calculator|"
  puts "|----------|"
  puts "enter first number"
  n1 = gets.chomp().to_f
  puts "enter 2nd number"
  n2 = gets.chomp().to_f
  puts "p(plus) or m(minus) or t(times) or d(divide)"
  calc = gets.chomp()
  case calc
  when "p"
    puts n1 + n2
  when "m"
    puts n1 - n2
  when "t"
    puts n1 * n2
  when "d"
    puts n1 / n2
  end
  starterr
end
def story
  puts "|--------------|"
  puts "|a random story|"
  puts "|--------------|"
  puts "enter a name"
  name = gets.chomp()
  puts "enter a colour"
  col = gets.chomp()
  puts "enter a celebrity"
  cel = gets.chomp()
  puts "Yesterday I went to a park."
  puts ("There I saw " + cel + " playing monopoly with " + name + "!")
  puts ("I guess you could say that was " + col + "y!")
  starterr
end
def starterr
puts "---------------------------------------------------------------|"
puts "hello! this is a ruby program"
puts "a demo of my current abilities in the ruby programming language."
puts "press 1 for calculator, 2 for a Random Story, 3 to quit"
choosing = gets.chomp()
puts ("you chose:" + choosing)
case choosing
  when "1"
  calcer
  when "2"
  story
  when "3"
  puts "goodbye! thanks for using my program."
  puts "---------------------------------------------------------------|"
  end
end
starterr
