Godot
Data
Ternary Operators
100

Which of the following keywords is used to declare a variable?

var

100

In game development, a player's "health" is a variable that stores a state. This is an example of a....

Property

100

What is the purpose of a ternary operator?

To assign a value to a variable based on a simple condition in a single line

200

Which of the following keywords is used to declare a function?

func

200

Give an example of a Compound Type.

Vector2, Player, Vector3, CharacterBody2D, Area2D, etc...

200

Unlike languages like C# or JavaScript (which use ? and : symbols), how does GDScript structure its ternary operator?

It uses normal English words like if and else

300

What is the simplest and most complete definition of a Scene in Godot?

A collection of game objects (Nodes) and the scripts that manipulate them.

300

What is the definition of an immutable variable?

A variable that cannot be changed after initialization.

300

Where is the 'Condition' located in a GDScript ternary operator?

Smack in the middle, between the True and False values

400

Which symbol do we use to access a node from the Node Tree?

$

400

What is an Enumerator (enum)?

A collection of named constants.

500

What does the Lerp() function do and what parameters (input variables) does it need?

It moves a value from the from to the to parameters based on the delta.

500

Explain why constants are faster than regular mutable variables.

Constants are baked directly into the CPU's instructions, requiring no travel time