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

Foundations-of-Computer-Science WGU Foundations of Computer Science Questions and Answers

Questions 4

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
Questions 5

What is traversal in the context of trees and graphs?

Options:

A.

The process of changing the value of nodes

B.

The process of removing all nodes

C.

The process of connecting all nodes

D.

The process of visiting all nodes

Buy Now
Questions 6

Given the following code, what is the expected output?

Options:

A.

[10, 20, 30, 40]

B.

[1, 10]

C.

[1, 2, 3, 4]

D.

array([10, 20, 30, 40])

Buy Now
Questions 7

The np_2d array stores information about multiple family members. Each row represents a different person, and the columns store family member attributes in the following order:

Age (years)

Weight (pounds)

Height (inches)

How is the weight of all family members selected from the np_2d array?

Options:

A.

np_2d[:, 2]

B.

np_2d[:, 1]

C.

np_2d[2, :]

D.

np_2d[1, :]

Buy Now
Questions 8

What is the expected output of numpy_array[1]?

Options:

A.

An error message in the array

B.

The second element of the array

C.

A display of the entire array

D.

The first element of the array

Buy Now
Questions 9

What code would print a subarray of the first 5 elements in numpy_array?

Options:

A.

print(numpy_array[1:5])

B.

print(numpy_array.get(0, 5))

C.

print(numpy_array[:5])

D.

print(numpy_array.get(5, 1))

Buy Now
Questions 10

Which action is taken if the first number is the lowest value in a selection sort?

Options:

A.

The first number is increased by one.

B.

The first number is duplicated.

C.

It swaps the selected element with the last unsorted element.

D.

It swaps the selected element with the first unsorted element.

Buy Now
Questions 11

print(20 ♦ 5)

What will the output be of this line?

Options:

A.

20 + 5

B.

no output

C.

#25

D.

Syntax Error

Buy Now
Questions 12

What is the purpose of the pointer element of each node in a linked list?

Options:

A.

To keep track of the list size

B.

To store the data value

C.

To indicate the next node

D.

To indicate the current position

Buy Now
Questions 13

Which statement describes the data type restriction found in most NumPy arrays?

Options:

A.

NumPy arrays are restricted to string data types only.

B.

NumPy arrays must be of the same type of data.

C.

NumPy arrays can only hold integer data types.

D.

NumPy arrays adapt to the most complex data type on the fly.

Buy Now
Questions 14

Which line of code below contains an error in the use of NumPy?

Options:

A.

wgu_list = np.quicksort(arr)

B.

print(wgu_list)

C.

import numpy as np

D.

arr = np.array([3, 2, 0, 1])

Buy Now
Questions 15

Which aspect is excluded from a NumPy array’s structure?

Options:

A.

The data pointer

B.

The shape of the array

C.

The data type or dtype pointer

D.

The encryption key of the array

Buy Now
Questions 16

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
Questions 17

What is the main advantage of using NumPy arrays over regular Python lists for data analysis?

Options:

A.

NumPy arrays can bring different types into the array at the same time.

B.

NumPy arrays can only hold elements of the same type.

C.

NumPy arrays can perform calculations over entire collections of values.

D.

NumPy arrays can concatenate lists by default.

Buy Now
Questions 18

What will be the result of performing the slice fam[:3]?

Options:

A.

A list with the first three elements of fam

B.

A list with the first four elements of fam

C.

A list with the first two elements of fam

D.

A list with the last three elements of fam

Buy Now
Questions 19

What type of encryption is provided by encryption utilities built into the file system?

Options:

A.

Encryption in motion

B.

Encryption authentication

C.

Encryption at rest

D.

Encryption steganography

Buy Now
Questions 20

m = 30

n = 30

What will be the output of print(id(m), id(n)) after executing the following code?

Options:

A.

Two identical numbers

B.

Two different numbers

C.

0 0

D.

Error

Buy Now
Questions 21

What is the expected output of calling .shape on a NumPy 2D array?

Options:

A.

The type of elements in the array

B.

The number of rows and columns in the 2D array

C.

The sum of the dimensions of the array

D.

The total number of elements in the array

Buy Now
Exam Name: WGU Foundations of Computer Science
Last Update: Apr 7, 2026
Questions: 70

PDF + Testing Engine

$134.99

Testing Engine

$99.99

PDF (Q&A)

$84.99