Hello World
Part of the Fundamentals section of Coddy's Ruby journey — lesson 2 of 88.
The "Hello World!" is a simple program that outputs Hello World! to the screen.
In Ruby, we use puts to show words on the screen. The words go inside quotation marks.
Let's take a look at the "Hello World!" program in Ruby:
puts "Hello World!"Challenge
EasyUse the code view to write a program that outputs Hello World!
Note that anything inside quotation marks is case sensitive. For example:
puts "Hello World!"puts "hello world!"are different things (notice the capital letters in the first line).
Cheat sheet
To print to the screen in Ruby use puts:
puts "Hello World!"Text inside quotation marks is case sensitive.
Try it yourself
# TODO: Write your code hereThis lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Logical Operators Part 42Variables and Data Types
Numbers and VariablesString Data TypeBoolean Data TypeSymbol Data TypeChecking Data TypesNaming ConventionsRecap - Variable Creation8Loops
For Loop with RangesWhile LoopBreakNextRecap - FactorialTimes LoopUntil LoopNested LoopsRecap - Dynamic Input3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsRecap - Simple MathComparison Operators6Basic IO
Output with putsOutput with print and pOutput With VariablesInput with getsChomp MethodType ConversionRecap - Age CalculatorRecap - True or False