Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialalec burnett
2,501 Pointshow do i say "hello world!' ive tried things that i thought was right
its the question on the quiz
2 Answers
Salman Akram
Courses Plus Student 40,065 PointsHi Alec,
You have to put string on the screen and use "print"
print "Hello World!"
Brandon Barrette
20,485 PointsSo remember to print something to the screen you have:
print "Hello World!"
which will not end in a new line character (which means all text afterwards will stay on the same line) Then there is
puts "Hello World!"
This has a new line character so only "Hello World!" will be on that line. Notice that:
print "Hello World!\n"
(where \n means newline) is equivalent to
puts "Hello World!"
alec burnett
2,501 Pointsprints hello world and puts doesn't work
Brandon Barrette
20,485 PointsIt's print not plural and puts plural. They are two separate methods. One automatically puts in a newline (puts) and the other does not (print).
alec burnett
2,501 Pointsalec burnett
2,501 Pointsthat didn't work
Salman Akram
Courses Plus Student 40,065 PointsSalman Akram
Courses Plus Student 40,065 PointsTry this way
puts "Hello World!"