C173 WGU MIDTERM EXAM 2025
algorithm - -A sequence of instructions that solves a problem
Computational Thinking - -creating a sequence of instructions to solve a problem
ASCII - -American Standard Code for Information Interchange, and was developed in
1963. ASCII uses 7 bits per code, and has codes for 128 characters.
Unicode - -Character encoding standard, published in 1991, whose codes can have
more bits than ASCII and thus can represent over 100,000 items, such as symbols and
non-English characters.
= - -An assignment of a left-side variable with a right-side value. = is NOT equality as in
mathematics. Thus, x = 5 is read as "x is assigned with 5", and not as "x equals 5"
variable declaration - -Declares a new variable, specifying the variable's name and type
assignment statement - -Assigns the variable on the left-side of the = with the current
value of the right-side expression.
Identifier - -A name created by a programmer for an item like a variable or function.
Must be a sequence of letters (a-z, A-Z), underscores (_), and digits (0-9)
start with a letter or underscore. Case sensitive.
Reserved word (or keyword) - -A word that is part of the language, like integer, Get, or
Put. A programmer cannot use a reserved word as an identifier.
Literal - -Specific value in code, like 2.
Operator - -A symbol that performs a built-in calculation, like the operator + which
performs addition
Unary minus - -- used as negative
Incremental development - -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.
floating-point number - -A real number, like 98.6, 0.0001, or -666.667. The term
"floating-point" refers to the decimal point being able to appear anywhere ("float") in the
number. A variable declared as type float stores a floating-point number.
floating-point literal - -A number with a fractional part, even if that fraction is 0, as in 1.0,
0.0, or 99.573.
WGU
, WGU
function call - -A statement that executes a function. It consists of the function name
followed by an argument list. Ex. SquareRoot(variable)
seed - -A built in integer when no previous random integer exists for RandomNumber().
Can specify seed random numbers with the function SeedRandomNumber() - this can
only be done once in a program before the first call to RandomNumber().
type conversion - -A conversion of one data type to another, such as an integer to a
float.
type cast - -Converts a value of one type to another type.
A programmer can type cast an integer to float by multiply the integer by the float literal
1.0. Ex: If myIntVar is 7, then myIntVar * 1.0 converts integer 7 to float 7.0.
modulo operator (%) - -The modulo operator evaluates to the remainder of the division
of two integer operands. Examples:
24 % 10 is 4. Reason: is 2 with remainder 4.
50 % 50 is 0. Reason: is 1 with remainder 0.
1 % 2 is 1. Reason: is 0 with remainder 1.
Constant - -A named value item that holds a value that cannot change.
A good practice is to minimize the use of literal numbers in code by using constants to
improve code readability. Ex: newPrice = origPrice - 5 is less clear than newPrice =
origPrice - PRICE_DISCOUNT, where PRICE_DISCOUNT is a constant.
Naming convention is all caps with _ separating words (above)
array - -A special variable having one name, but storing a list of data items, with each
item being directly accessible. Some languages use a construct similar to an array
called a vector. Each item in an array is known as an element.
index - -Each element's location number in an array. The index enables direct access to
any element.
Assignment Operator - -The '=' character causes the compiler or interpreter to evaluate
to the expression on its right and store the result in the variable(s) on its left.
Arithmetic Operators - -+, -, *, /, %
Scalar Variable - -another term for a simple variable
Simple Variable - -One that is unrelated to any other variable in memory
WGU