WGU C949 ACTUAL EXAM PAPER 2026
QUESTIONS WITH ANSWERS GRADED A+
◍ 3.
Answer: How many times will count++ execute when i = 3, in this
pseudocode? int count = 0; int N = 4; for (int i = 0; i < N; i++) for (int j = 0;
j < i; j++) count++;
◍ string.
Answer: Sequence type: Used for text
◍ What is an attribute of a bubble sort algorithm?.
Answer: Ideal for small number of n
◍ hash function.
Answer: computes a bucket index from the item's key
◍ Value:.
Answer: A ________ such as "20", "abcdef", or 55.
◍ float.
Answer: Numeric type: Used for floating-point numbers
◍ Push(PQueue, x).
Answer: Inserts x after all equal or higher priority itemsExample starting
with priority queue: 42, 61, 98 (front is 42)Push(PQueue, 87). PQueue: 42,
61, 87, 98
◍ Shell Sort.
Answer: treats the input as a collection of interleaved lists, and sorts each
list individually with a variant of the insertion sort algorithm.
◍ range().
Answer: generates a sequence of numbers, starting at zero and ending before
, a value given inside the parentheses. For example, for i in range(3) sets i to
0 during the first iteration of the for loop, i to 1 during the second iteration,
and finally i to 2 on the third iteration. The value within the parentheses is
not included in the generated sequence.
◍ An array soc of size 1009 is used where the index is an integer in [0,1008]
and the hash-function key%1009. Where will the data associated with the
key given by the last 4 social security digits '2023' be stored?.
Answer: In soc[5]
◍ Identity:.
Answer: A unique identifier that describes the object
◍ Branching.
Answer: directs a program to execute either one group of statements or
another, depending on the result of an expression.
◍ Stack.
Answer: Which data structure allows insertion and removal from only one
end of the data structure?
◍ GetLength(list).
Answer: Returns the number of items in the listGetLength(list) returns 2
◍ "bird".
Answer: Items were added sequentially in this stack starting with "dog":
"bird""rabbit""cat""dog" What is the return value of the pop operation?
◍ key.
Answer: value used to map to an index. For all items that might possibly be
stored in the hash table, every key is ideally unique, so that the hash table's
algorithms can search for a specific item by that key.
◍ my_list[:end].
Answer: Get a list from beginning of list to end (minus 1).Code: my_list =
[5, 10, 20, 40, 80]print(my_list[:4])Output: [5, 10, 20, 40]
◍ A 100 element hash table has 100.
, Answer: Each hash table array element is called a bucket.
◍ itemgetter(),.
Answer: efined in Python's operator module, can be used to get a key from
an element using an index instead of a custom key function. Ex: key =
key_is_name can be replaced with key = operator.itemgetter(0), because the
element names are found at index 0. itemgetter() takes an integer value
argument and returns a function defined like key_is_name(element). Ex.
operator.itemgetter(5) returns a function that takes a list element argument,
and the function returns element[5].
◍ When the program uses key-value pairs as its data.
Answer: When should a dictionary be used instead of a list?
◍ stack.
Answer: Which data structure uses a last in, first out (LIFO) removal of
items?
◍ How many times in this pseudocode is the function F called? Main Declare
K as Integer K = 3 Set Result = F(K) Write ResultEnd ProgramFunction
F(N) as Integer If N == 1 ThenSet F = 1 Else Set F = N * F(N - 1) Set N = N
- 1 End IfEnd Function.
Answer: 3
◍ my_list[start:end].
Answer: Get a list from start to end (minus 1).my_list = [5, 10,
20]print(my_list[0:2])[5, 10]
◍ "orange".
Answer: Four words were added to an initially empty linked list in the
following order: orange, carrot, banana, and apple.Which word is at the
beginning of the list?
◍ min(list).
Answer: Find the element in list with the smallest value.
◍ len(list).
QUESTIONS WITH ANSWERS GRADED A+
◍ 3.
Answer: How many times will count++ execute when i = 3, in this
pseudocode? int count = 0; int N = 4; for (int i = 0; i < N; i++) for (int j = 0;
j < i; j++) count++;
◍ string.
Answer: Sequence type: Used for text
◍ What is an attribute of a bubble sort algorithm?.
Answer: Ideal for small number of n
◍ hash function.
Answer: computes a bucket index from the item's key
◍ Value:.
Answer: A ________ such as "20", "abcdef", or 55.
◍ float.
Answer: Numeric type: Used for floating-point numbers
◍ Push(PQueue, x).
Answer: Inserts x after all equal or higher priority itemsExample starting
with priority queue: 42, 61, 98 (front is 42)Push(PQueue, 87). PQueue: 42,
61, 87, 98
◍ Shell Sort.
Answer: treats the input as a collection of interleaved lists, and sorts each
list individually with a variant of the insertion sort algorithm.
◍ range().
Answer: generates a sequence of numbers, starting at zero and ending before
, a value given inside the parentheses. For example, for i in range(3) sets i to
0 during the first iteration of the for loop, i to 1 during the second iteration,
and finally i to 2 on the third iteration. The value within the parentheses is
not included in the generated sequence.
◍ An array soc of size 1009 is used where the index is an integer in [0,1008]
and the hash-function key%1009. Where will the data associated with the
key given by the last 4 social security digits '2023' be stored?.
Answer: In soc[5]
◍ Identity:.
Answer: A unique identifier that describes the object
◍ Branching.
Answer: directs a program to execute either one group of statements or
another, depending on the result of an expression.
◍ Stack.
Answer: Which data structure allows insertion and removal from only one
end of the data structure?
◍ GetLength(list).
Answer: Returns the number of items in the listGetLength(list) returns 2
◍ "bird".
Answer: Items were added sequentially in this stack starting with "dog":
"bird""rabbit""cat""dog" What is the return value of the pop operation?
◍ key.
Answer: value used to map to an index. For all items that might possibly be
stored in the hash table, every key is ideally unique, so that the hash table's
algorithms can search for a specific item by that key.
◍ my_list[:end].
Answer: Get a list from beginning of list to end (minus 1).Code: my_list =
[5, 10, 20, 40, 80]print(my_list[:4])Output: [5, 10, 20, 40]
◍ A 100 element hash table has 100.
, Answer: Each hash table array element is called a bucket.
◍ itemgetter(),.
Answer: efined in Python's operator module, can be used to get a key from
an element using an index instead of a custom key function. Ex: key =
key_is_name can be replaced with key = operator.itemgetter(0), because the
element names are found at index 0. itemgetter() takes an integer value
argument and returns a function defined like key_is_name(element). Ex.
operator.itemgetter(5) returns a function that takes a list element argument,
and the function returns element[5].
◍ When the program uses key-value pairs as its data.
Answer: When should a dictionary be used instead of a list?
◍ stack.
Answer: Which data structure uses a last in, first out (LIFO) removal of
items?
◍ How many times in this pseudocode is the function F called? Main Declare
K as Integer K = 3 Set Result = F(K) Write ResultEnd ProgramFunction
F(N) as Integer If N == 1 ThenSet F = 1 Else Set F = N * F(N - 1) Set N = N
- 1 End IfEnd Function.
Answer: 3
◍ my_list[start:end].
Answer: Get a list from start to end (minus 1).my_list = [5, 10,
20]print(my_list[0:2])[5, 10]
◍ "orange".
Answer: Four words were added to an initially empty linked list in the
following order: orange, carrot, banana, and apple.Which word is at the
beginning of the list?
◍ min(list).
Answer: Find the element in list with the smallest value.
◍ len(list).