From: prasad Date: 2010-03-25T16:39:10+09:00 Subject: Re: Help a noob. --0016e64dc8fa1e58f904829b0a48 Content-Type: text/plain; charset=UTF-8 Correct the last line as follows: puts 'Maybe, your favourite number should be ' + NFnum.to_s + '.' that is , convert an integer to a string with 'to_s' before adding to another string. Also, it is a convention to use small letters for simple variable names, so change the names like Fname as follows: Fname to f_name or first_name You can search for on line tutorials to start with. Prasad 2010/3/25 Omar Velez > Ok, I have been programming for two days now. Ruby is my first > language ever. But all the books I look for already assume you have a > good deal of knowledge in programming. Does anyone know where I can get > a good basic start that will give me lots of examples? Also if it is > possible can someone please tell me what I am doing wrong? This is my > first program so please do not make too much fun of me. Thanks yall. > > -Mehektet- > > This is my program... > > # Program will ask for a persons personal information and then display > # the results on the screen. Finally it will ask a person to give their > # favourite number and then add it to their age and suggest a new > # favourite number. > > puts 'What is your first name?' > Fname = gets.chomp > puts 'What is your middle name?' > Mname = gets.chomp > puts 'What is your last name?' > Lname = gets.chomp > > puts '' > > puts 'What is your age?' > Age = gets.chomp > > puts '' > > puts 'What is your favourite number?' > Fnum = gets.chomp > > puts ' ' > > puts 'This is your information...' > puts 'You are ' +Fname+ ' ' +Mname+ ' ' +Lname+ '.' > puts 'Your age is ' +Age+ '.' > puts 'And your favourite number is ' +Fnum+ '.' > > > C = Fnum.to_i > A = Age.to_i > > NFnum = C + A > > > puts 'Maybe, your favourite number should be ' +NFnum+ '.' > -- > Posted via http://www.ruby-forum.com/. > > --0016e64dc8fa1e58f904829b0a48--