I'm starting to learn Ruby using the Learn to Program book by Chris
Pine.
On a mini assignment I need to:
"Write a program which asks for a person's favorite number. Have your
program add one to the number, then suggest the result as a bigger and
better favorite number. (Do be tactful about it, though.) "
I'm starting to learn Ruby using the Learn to Program book by Chris
Pine.
On a mini assignment I need to:
"Write a program which asks for a person's favorite number. Have your
program add one to the number, then suggest the result as a bigger and
better favorite number. (Do be tactful about it, though.) "
Are you sure the problem is on line 4? Seems like it is more likely
that it is on line 5 where you try to put new_number into a new message.
That is where you need to convert it back to a string.
Gary Wright
···
On Dec 18, 2011, at 11:22 PM, Fellipe de Paula wrote:
I'm starting to learn Ruby using the Learn to Program book by Chris
Pine.
On a mini assignment I need to:
"Write a program which asks for a person's favorite number. Have your
program add one to the number, then suggest the result as a bigger and
better favorite number. (Do be tactful about it, though.) "