From: "Jesús Gabriel y Galán" Date: 2010-02-11T19:37:02+09:00 Subject: Re: Need help with Code (Input Functionality) On Thu, Feb 11, 2010 at 7:19 AM, Raveendran .P wrote: > The exact solution for above(first post) issue > > > Code: > > puts 'What is your name?' > name = gets > puts 'What is your city?' > city = gets > puts 'What is your favorite color?' > color = gets > print "Your name is #{name.chomp}.", "You live in #{city.chomp}.", "Your > Favorite color is #{color.chomp}." I think it's better to do this: puts 'What is your name?' name = gets.chomp puts 'What is your city?' city = gets.chomp puts 'What is your favorite color?' color = gets.chomp print "Your name is #{name}.", "You live in #{city}.", "Your Favorite color is #{color}." Because you are probably using the variables in other places, and you don't want to be chomping every time you use them. Jesus.