How to write a print statement


#1

I dont understand what i'm doing wrong. What is the difference between a puts a and a print? The description doesn't explain it very well at all. I have typed
"How are you today?"
"I am well"
and it is saying that i haven't put a print statement, which is weird because i thought what i was writing was a print and that i wouldn't be able to pass because i had no "puts"
Someone PLEASE help me out, i really want to learn this!


#2

Hi Annie,

A quick search would've found you the answer :)

puts adds a newline to the end of the output. print does not.
- http://stackoverflow.com/a/5018677

As to what you're doing wrong, I'm not sure yet. Which exercise are you on?


#3

I just figured it out! I'm embarrassed about how easy it was, but i didn't realise I had to first write 'puts' or 'print' and then whatever words afterward! Thank you anyway :smile: