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

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

How is the NumPy package imported into a Python session?

Options:

A.

import num_py

B.

import numpy as np

C.

using numpy

D.

include numpy

Buy Now
Questions 6

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 7

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 8

Which character is used to indicate a range of values to be sliced into a new list?

Options:

A.

","

B.

"+"

C.

"="

D.

":"

Buy Now
Questions 9

What are Python functions that belong to specific Python objects?

Options:

A.

Modules

B.

Methods

C.

Scripts

D.

Libraries

Buy Now
Questions 10

What is a key advantage of using NumPy when handling large datasets?

Options:

A.

Built-in machine learning algorithms

B.

Automatic data cleaning

C.

Efficient storage and computation

D.

Interactive visualizations

Buy Now
Questions 11

Which is the most powerful command line interface on Windows systems?

Options:

A.

Task Manager

B.

Command Prompt

C.

Control Panel

D.

PowerShell

Buy Now
Questions 12

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

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

Which order is impossible when traversing a binary tree using depth first search?

Options:

A.

Level-order traversal

B.

Pre-order traversal

C.

Post-order traversal

D.

In-order traversal

Buy Now
Questions 15

Which statement describes the relationship between trees and graphs?

Options:

A.

Trees do not have levels.

B.

Trees can have cycles.

C.

Trees can have unconnected nodes.

D.

Trees cannot have cycles.

Buy Now
Questions 16

Which Windows 11 tool enables a user to manually add a Bluetooth device if it does not automatically configure when first connected?

Options:

A.

Network center

B.

Task scheduler

C.

Windows defender

D.

Device manager

Buy Now
Questions 17

What is an ndarray in Python?

Options:

A.

A built-in Python data array used to store collections of items.

B.

A native Python object that represents a tree-like hierarchical data structure.

C.

An n-dimensional array object provided by the NumPy library.

D.

A module that provides network socket functions similar to XML.

Buy Now
Questions 18

What is a correct call to the linear search defined as def linear_search(customersList, search_value): ?

Options:

A.

find_linear(customersList)

B.

print(linear_search(customersList, search_value))

C.

linear_search()(customersList)

D.

search_linear(customersList, search_value)

Buy Now
Questions 19

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 20

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 21

Which method converts the default smallest-to-largest index order of a list to instead be the opposite?

Options:

A.

reverse()

B.

sortDescending()

C.

flip()

D.

invert()

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

$30  $99.99
Foundations-of-Computer-Science PDF + Engine

Foundations-of-Computer-Science PDF + Testing Engine

$40.5  $134.99