WGU D278 SCRIPTING AND
PROGRAMMING COMPREHENSIVE EXAM
STUDY GUIDE WITH COMPLETE
SOLUTIONS
●● Assignment Statement
Answer: Assigns a variable with a value.
Example: The example states that x is assigned to 5.
x=5
●● Variable Declaration
Answer: A statement that declares a new variable, specifying the
variable's name and type.
●● Integer
Answer: A whole number. Commonly used to count items.
Example: 1, 999, 0, -25.
●● Identifier
,Answer: A starts with a letter, can contain a sequence of letters, digits,
and underscores.
Example: num_Cars1, numCars, num__Cars
●● Reserved Word (Key Word)
Answer: A word that has a special meaning in a programming language
and therefore cannot be used as a name by the programmer.
Examples: Get, Put
●● Naming Conventions
Answer: A set of style guidelines defined by a company, team, teacher,
etc., for naming variables.
Are case-sensitive.
Uses Camel Case: capitalizing each word except the first.
Underscore Separated: words are lowercase and separated by
underscores.
●● Expression
, Answer: A combination of items like variables, literals, operators, and
parentheses that evaluates to a value.
Example: x is 3
2 * (x + 1) = 8
●● Literal
Answer: A specific value in code, like 2.
●● Operator
Answer: A symbol that performs a built-in calculation.
Example:
*/+-
●● Precedence Rules for Arithmetic Operators
Answer: Rules used to evaluate an expression in a certain order.
1. ( ) - Items in parentheses.
2. Unary- used for negotiation
3. * / having equal precedence
4. + - having equal precedence
PROGRAMMING COMPREHENSIVE EXAM
STUDY GUIDE WITH COMPLETE
SOLUTIONS
●● Assignment Statement
Answer: Assigns a variable with a value.
Example: The example states that x is assigned to 5.
x=5
●● Variable Declaration
Answer: A statement that declares a new variable, specifying the
variable's name and type.
●● Integer
Answer: A whole number. Commonly used to count items.
Example: 1, 999, 0, -25.
●● Identifier
,Answer: A starts with a letter, can contain a sequence of letters, digits,
and underscores.
Example: num_Cars1, numCars, num__Cars
●● Reserved Word (Key Word)
Answer: A word that has a special meaning in a programming language
and therefore cannot be used as a name by the programmer.
Examples: Get, Put
●● Naming Conventions
Answer: A set of style guidelines defined by a company, team, teacher,
etc., for naming variables.
Are case-sensitive.
Uses Camel Case: capitalizing each word except the first.
Underscore Separated: words are lowercase and separated by
underscores.
●● Expression
, Answer: A combination of items like variables, literals, operators, and
parentheses that evaluates to a value.
Example: x is 3
2 * (x + 1) = 8
●● Literal
Answer: A specific value in code, like 2.
●● Operator
Answer: A symbol that performs a built-in calculation.
Example:
*/+-
●● Precedence Rules for Arithmetic Operators
Answer: Rules used to evaluate an expression in a certain order.
1. ( ) - Items in parentheses.
2. Unary- used for negotiation
3. * / having equal precedence
4. + - having equal precedence