Spring Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

Foundations-of-Computer-Science Exam Dumps - WGU Courses and Certificates Questions and Answers

Question # 4

How does the data type of a variable get set in Python?

Options:

A.

It is explicitly declared by the programmer.

B.

It is chosen randomly.

C.

It is always set to string by default.

D.

It is determined by the value assigned to it.

Buy Now
Question # 5

What is the layer of programming between the operating system and the hardware that allows the operating system to interact with it in a more independent and generalized manner?

Options:

A.

The hardware abstraction layer

B.

The boot loader layer

C.

The task scheduler layer

D.

The file system layer

Buy Now
Question # 6

What is the correct way to convert an integer to a string in Python?

Options:

A.

tostring(variable)

B.

int_to_str(variable)

C.

string(variable)

D.

str(variable)

Buy Now
Question # 7

What is the likely cause if a default Python configuration does not recognize a NumPy array as an allowed data structure?

Options:

A.

The NumPy package is not present.

B.

The array module is not imported.

C.

The Python interpreter is misconfigured.

D.

The Python version is outdated.

Buy Now
Question # 8

What is the expected result of running the following code: list1[0] = "California"?

Options:

A.

A new list will be created with the value "California".

B.

The first value in the list will be replaced with "California".

C.

The list will be extended by adding "California" at the end.

D.

A second element will be added to the line "California".

Buy Now
Question # 9

How is a NumPy array named data with 6 elements reshaped into a 2x3 array?

Options:

A.

np.reshape(data, (2, 3))

B.

np_reshape(list, (2, 3))

C.

data.set_shape(2, 3)

D.

data_reshape[2, 3]

Buy Now
Question # 10

Which Python function is used to display the data type of a given variable?

Options:

A.

type()

B.

GetVar()

C.

Show()

D.

Data()

Buy Now
Question # 11

What Python code would return the value 40 from np_2d, where np_2d = np.array([[1, 2, 3, 4], [10, 20, 30, 40]])?

Options:

A.

np_2d[3, 1]

B.

np_2d[1, 3]

C.

np_2d[0, 4]

D.

np_2d[4, 1]

Buy Now
Question # 12

What is the first step in the selection sort algorithm?

Options:

A.

Find the highest value and the lowest value in the list.

B.

Swap the first and last elements.

C.

Determine the lowest value starting from the first position.

D.

Sort the list in descending order.

Buy Now
Question # 13

How can someone subset the last two rows and columns of a 2D NumPy array?

Options:

A.

array[-2:, :]

B.

array[-1:, -1:]

C.

array[-2:, -2:]

D.

array[:, -2:]

Buy Now
Exam Name: WGU Foundations of Computer Science
Last Update: Feb 28, 2026
Questions: 70
Foundations-of-Computer-Science pdf

Foundations-of-Computer-Science PDF

$25.5  $84.99
Foundations-of-Computer-Science Engine

Foundations-of-Computer-Science Testing Engine

$28.5  $94.99
Foundations-of-Computer-Science PDF + Engine

Foundations-of-Computer-Science PDF + Testing Engine

$40.5  $134.99