Learn
Introduction to Ruby
'puts' and 'print'

The print command just takes whatever you give it and prints it to the screen. puts (for “put string”) is slightly different: it adds a new (blank) line after the thing you want it to print. You use them like this:

puts "What's up?" print "Oxnard Montalvo"

No parentheses or semicolons needed!

Instructions

1.

In the editor, use at least one print statement and at least one puts statement. You can print out any strings you like! (Make sure to put your strings between quotes, like this: "Hello!".)

Folder Icon

Take this course for free

Already have an account?