Problem set study Exam Questions and
Correct Answers Guaranteed Success
2024/2025
Arithmetic operators - correct answer +, -, *, /, %
Scalar variable - correct answer another term for a simple
variable
Simple variable - correct answer one that is unrelated to any
other variable in memory
Branch - correct answer a sequence of statements only
executed under a certain condition. A decision creates two
branches.
Equality operator - correct answer == evaluates to true if the
left and right sides are equal. Different (!=). No floats.
Relational operator - correct answer determines whether a
specific relationship exists between two values
Logical operator - correct answer treats operands as being
true or false, and evaluates to true or false. Logical operators
include and, or, not.
Epsilon - correct answer the difference threshold indicating
that floating-point numbers are equal. 0.0001 is common.
, Loop - correct answer a programming construct that repeats
a group of commands (loop body). Each time through a loop is an
iteration.
Sentinel value - correct answer a special (pre-selected) value
indicating the end of a list, such as a list of positive integers
ending with 0, as in 10 1 6 3 0.
Loop expression - correct answer the expression checked for
whether to enter the loop body
While loop - correct answer a loop that repeatedly executes
the loop body while the loop's expression evaluates to true.
For loop - correct 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. Three
parts: a loop variable initialization, a loop expression, and a loop
variable update.
Do-while loop - correct answer a loop that first executes the
loop body's statements, then checks the loop condition.
Compared to a while loop, a do-while loop is useful when the loop
should iterate at least once.
Function - correct answer a named list of statements