0

the excercise in the book says that I should ask for the names individually and then get the name length. I am stuck on the 8th line? Is that what I am supposed to do to get the name?

    puts "What\'s your first name?"
    first = gets.chomp
    puts "What\'s your middle name?"
    middle = gets.chomp
    puts "What\'s your last name?"
    last = gets.chomp
    puts "So, your full name is #{first} #{middle} #{last}." 
    name = # {first} #{middle} #{last}
    puts "Did you know that are + #{name.length.t_s} + characters "
    puts "in your + name + "

Thank you so much for your help!

jazzlark
  • 35
  • 3

1 Answers1

0

It should be (using ruby string embedding):

name = "#{first} #{middle} #{last}"

http://www.ruby-doc.org/core-2.0/String.html

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160