WGU SCRIPTING AND PROGRAMMING
FOUNDATIONS QUESTIONS WITH VERIFIED
ANSWERS LATEST UPDATE
Question 1.
Loop
ANSWER
A program construct that repeatedly executes the loop's statements (known as the loop body)
while the loop's expression is true; when false, execution proceeds past the loop. Each time
through a loop's statements is called an iteration.
Question 2.
Expression
ANSWER
A combination of items, like variables, literals, operators, and parentheses, that evaluates to a
value. Example: 2 * (x+1)
Question 3.
Branch
ANSWER
A sequence of statements only executed under a certain condition.
Question 4.
Operator
ANSWER
A symbol that performs a built-in calculation, like the operator + which performs addition.
Question 5.
Scalar variable
ANSWER
A single-item (non-array) variable.
,Question 6.
For loop
ANSWER
A loop consisting of a loop variable initialization, a loop expression, and a loop variable update
that typically describes iterating *for* a specific number of times.
Question 7.
Logical operator
ANSWER
Treats operands as being true or false, and evaluates to true or false. Logical operators include
and, or, not.
Question 8.
if-else statement
ANSWER
An if expression with the true branch's sub-statements, followed by an else part with any false
branch sub-statements.
Question 9.
Object
ANSWER
In a program, an object consists of some internal data items plus operations that can be
performed on that data.
Question 10.
Cursor
ANSWER
Indicates where the next output item will be placed in the output.
, Question 11.
Incremental development
ANSWER
The process of writing, compiling, and testing a small amount of code, then writing, compiling,
and testing a small amount more (an incremental amount), and so on.
Question 12.
Reserved word or keyword
ANSWER
A word that is part of the language, like integer, Get, or Put. A programmer cannot use a
reserved word as an identifier.
Question 13.
Parameter
ANSWER
A function input specified in a function definition. Example: A pizza area function might have
diameter as an input.
Question 14.
Array
ANSWER
An ordered list of items of a given data type, like an array of integers or an array of floats.
Array indices start from 0, not 1.
Question 15.
Compiled language
ANSWER
First converted by a tool (*compiler*) into machine code, which can run on a particular
machine. Examples include C, C++, and Java.
FOUNDATIONS QUESTIONS WITH VERIFIED
ANSWERS LATEST UPDATE
Question 1.
Loop
ANSWER
A program construct that repeatedly executes the loop's statements (known as the loop body)
while the loop's expression is true; when false, execution proceeds past the loop. Each time
through a loop's statements is called an iteration.
Question 2.
Expression
ANSWER
A combination of items, like variables, literals, operators, and parentheses, that evaluates to a
value. Example: 2 * (x+1)
Question 3.
Branch
ANSWER
A sequence of statements only executed under a certain condition.
Question 4.
Operator
ANSWER
A symbol that performs a built-in calculation, like the operator + which performs addition.
Question 5.
Scalar variable
ANSWER
A single-item (non-array) variable.
,Question 6.
For loop
ANSWER
A loop consisting of a loop variable initialization, a loop expression, and a loop variable update
that typically describes iterating *for* a specific number of times.
Question 7.
Logical operator
ANSWER
Treats operands as being true or false, and evaluates to true or false. Logical operators include
and, or, not.
Question 8.
if-else statement
ANSWER
An if expression with the true branch's sub-statements, followed by an else part with any false
branch sub-statements.
Question 9.
Object
ANSWER
In a program, an object consists of some internal data items plus operations that can be
performed on that data.
Question 10.
Cursor
ANSWER
Indicates where the next output item will be placed in the output.
, Question 11.
Incremental development
ANSWER
The process of writing, compiling, and testing a small amount of code, then writing, compiling,
and testing a small amount more (an incremental amount), and so on.
Question 12.
Reserved word or keyword
ANSWER
A word that is part of the language, like integer, Get, or Put. A programmer cannot use a
reserved word as an identifier.
Question 13.
Parameter
ANSWER
A function input specified in a function definition. Example: A pizza area function might have
diameter as an input.
Question 14.
Array
ANSWER
An ordered list of items of a given data type, like an array of integers or an array of floats.
Array indices start from 0, not 1.
Question 15.
Compiled language
ANSWER
First converted by a tool (*compiler*) into machine code, which can run on a particular
machine. Examples include C, C++, and Java.