Conceptual Actual 100% Correct Detailed Answers
Guaranteed Pass!!Current Update!!
inserting a new item at the beginning it causes no shift to
what is an advantage of a linked list over an array?n
the data
In the worst case, inserting a new node into a tree with N
N
nodes requires how many comparisons?
A is an integer counter that represents
how many variables reference an object. When an object's reference count
reference count is 0, that object is no longer referenced.
directs a program to execute either one group of state-
ments or another, depending on the result of an expres- Branching
sion.
A executes a block of code as long as the loop's
while loop
expression is True.
The syntax produces a new string, which
repeats the value of user_value 5 times. In this case, the
print(user_value*5)
value of user_value may be "-", thus the result of the
multiplication is " - ".
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
range()
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.
A maps names to objects. The Python in-
terpreter uses namespaces to track all of the objects in a namespace
program.
In a program, an consists of some internal data
object
items plus operations that can be performed on that data.
A such as "20", "abcdef", or 55. Value:
, WGU C949 Frequently Tested Exam Questions With Verified Multiple Choice and
Conceptual Actual 100% Correct Detailed Answers
Guaranteed Pass!!Current Update!!
Find the element in list with the smallest value. min(list)
Find the sum of all elements of a list (numbers only). sum(list)
find the index of the first element in list whose value
list.index(val)
matches val.
Count the number of occurrences of the value val in list. list.count(val)
Find the element in list with the largest value. max(list)
A, also called an identifier, is a sequence of
letters (a-z, A-Z, _) and digits (0-9), and must start with a
name
letter. Note that "_", called an underscore, is considered
to be a letter.
built-in function prints the type of an object. type()
A unique identifier that describes the object Identity:
O(n^2) A sort algorithm that repeatedly searches remain-
ing items to find the least one and moves it to its final selection sort
location.
Removes x Remove(list, 77), list: 99 Remove(list, x)
Returns item if found, else returns null Search(list, 99),
Search(list, x)
returns item 99Search(list, 22), returns null
Prints list's items in orderPrint(list) outputs: 99, 77 Print(list)
Sorts the lists items in ascending orderlist becomes: 77,
Sort(list)
99
Returns true if list has no items
IsEmpty(list)
For list 99, 77, IsEmpty(list) returns false
Returns the number of items in the listGetLength(list)
GetLength(list)
returns 2
data structure that stores subitems, with a name associat-
record
ed with each subitem
, WGU C949 Frequently Tested Exam Questions With Verified Multiple Choice and
Conceptual Actual 100% Correct Detailed Answers
Guaranteed Pass!!Current Update!!
a data structure that stores an ordered list of items, with
each item is directly accessible by a positional index
array
homogeneous data elements Inserting at the beginning
requires making room for the new item. So every current
item must be shifted once.
data structure that stores *ordered* list of items in nodes,
where each node stores data and has a pointer to the
next node; can have multiple subitems No shifting of other linked list
items is required, which is an advantage of using linked
lists.
A data structure that consists of nodes, with one root node
at the base of the tree, and two nodes (left child and right
child) extending from the root, and from each child node
binary tree
can have no children, single left or right, or both right and
left
data structure that stores *unordered* items by mapping
hash table
(or hashing) each item to a location in an array
a tree that maintains the simple property that a node's key
max-heap
is greater than or equal to the node's childrens' keys
a tree that maintains the simple property that a node's key
min-heap
is less than or equal to the node's childrens' keys
data structure for representing connections among items,
graph
and consists of vertices connected by edges
part of a graph the represents an item in a graph vertice
part of a graph that represents a connection between to
edge
vertices in a graph