Prints and puts


#1

how do you do prints and puts?


#2

Just use the codes normally.

like this:

puts "How are you?"

print "'im fine. How about you?"

Remember to dont use the symbol '=' after the code. 'Print' and 'Puts' not request to use this symbol.


#3

Prints and Puts
I used this
puts "What's up?"
print"Oxnard Montalvo"

The output is adding a nil to the end, any clue please?

The output I am getting is :
What's up?
Oxnard Montalvonil


#4

Hey did you find why it keeps adding nil at the end of your result?


#5

I haven't heard anything from anyone. Trying to see if I can find it. It's really annoying.


#6

I think it's because it's setup to automatically print the values of variables etc. without the print/puts command, so when it has nothing to automatically print it will just say "nil".

edit:
It actually just automatically prints the last line and nothing else. So if the last line isn't a variable or something it will print "nil".


#7

Thank you for your response