Hello World!
Part of the Fundamentals section of Coddy's GDScript journey. Lesson 2 of 92.
The "Hello World!" program outputs the text Hello World! to the screen.
In GDScript, print() shows text on the screen. The text goes inside quotation marks:
print("Hello World!")Every program in this course is written inside a block that starts with func _ready():. The lines inside it are indented by one level, and they run from top to bottom:
extends Node
func _ready():
print("Hello World!")For now, write your code on the indented lines. The Basic Program Structure lesson explains what the first lines mean.
Challenge
BeginnerWrite a program that prints Hello World!.
Replace the line pass with your print() statement. Keep it indented like pass is.
Try it yourself
extends Node
func _ready():
# Replace pass with your code
pass
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsInteger DivisionModulo OperatorArithmetic ShortcutsRecap - Simple MathComparison Operators10Functions
Declare a FunctionArgumentsReturnReturn TypesRecap - Sigma FunctionRecap - Validation FunctionDefault Values5Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Ternary OperatorPractice on your own: Online GDScript compiler