GDScript Quiz - Lesson 2 - Variables & Functions

Quiz
•
Computers
•
12th Grade
•
Medium

Peter Fletcher
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in GDScript?
A fixed data point that cannot change.
A storage location paired with a name that contains some known or unknown quantity or information, a value.
A type of function.
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In GDScript, which keyword is used to declare a constant?
var
const
static
func
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you correctly declare a function in GDScript?
function my_func():
def my_func():
func my_func():
function: my_func()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a variable that you intend to change later in your script?
const my_var = 10
var my_var = 10
static my_var = 10
my_var = 10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about local variables in GDScript?
They can only be declared inside functions.
They are accessible from anywhere in the script.
They persist between different runs of the game.
They automatically become global variables.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct statement about constants in GDScript.
The function takes no arguments and returns an integer.
The function takes two integers as arguments and does not return any value.
The function takes two integers as arguments and returns an integer.
The function is improperly declared and will cause a runtime error.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following function declaration indicate in GDScript? func my_function(x:int, y:int) -> int:
The function takes no arguments and returns an integer.
The function takes two integers as arguments and does not return any value.
The function takes two integers as arguments and returns an integer.
The function is improperly declared and will cause a runtime error.
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Python Fundamentals and Programming

Quiz
•
11th - 12th Grade
12 questions
JS Skill #1

Quiz
•
12th Grade
10 questions
JavaScript Cert Prep

Quiz
•
9th - 12th Grade
10 questions
GDScript Quiz - Lesson 3 - Conditional statements & Iteration

Quiz
•
12th Grade
10 questions
J277 - 2.2 - Functions in Python

Quiz
•
10th Grade - University
15 questions
Kuizi 15 - Web

Quiz
•
10th Grade - University
15 questions
Python revision

Quiz
•
10th Grade - University
15 questions
JavaScript Basics

Quiz
•
12th Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University