Spring Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > WGU > Courses and Certificates > Foundations-of-Computer-Science

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

Question # 4

Which protocol provides encryption while email messages are in transit?

A.

FTP

B.

HTTP

C.

TLS

D.

IMAP

Full Access
Question # 5

What are Python functions that belong to specific Python objects?

A.

Modules

B.

Methods

C.

Scripts

D.

Libraries

Full Access
Question # 6

What happens if you try to create a NumPy array with different types?

A.

The array will be created, but calculations will not be possible.

B.

The array will contain a single type, converting all elements to that type.

C.

The array will be created with no issues.

D.

The array will be split into multiple arrays, one for each type.

Full Access
Question # 7

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

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.

Full Access
Question # 8

What is traversal in the context of trees and graphs?

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

Full Access
Question # 9

What is the output of print(employees[3]) when employees = ["Anika", "Omar", "Li", "Alex"]?

A.

"Omar"

B.

"Alex"

C.

"Anika"

D.

"Li"

Full Access
Question # 10

What is the correct way to represent a boolean value in Python?

A.

"True"

B.

"true"

C.

True

D.

true

Full Access
Question # 11

What is the expected output of numpy_array[1]?

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

Full Access
Question # 12

What is the method for changing an element in a Python list?

A.

Use square brackets and the equals sign

B.

Use parentheses and the plus sign

C.

Use curly brackets and the equals sign

D.

Use the del keyword and the element’s value

Full Access
Question # 13

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?

A.

The hardware abstraction layer

B.

The boot loader layer

C.

The task scheduler layer

D.

The file system layer

Full Access
Question # 14

What happens if one element of a NumPy array is changed to a string?

A.

All elements in the array are coerced to strings.

B.

The operation is not allowed and raises an error.

C.

All elements in the array are coerced to integers.

D.

The array becomes a list of the original integers.

Full Access
Question # 15

How is the NumPy package imported into a Python session?

A.

import num_py

B.

import numpy as np

C.

using numpy

D.

include numpy

Full Access
Question # 16

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

A.

tostring(variable)

B.

int_to_str(variable)

C.

string(variable)

D.

str(variable)

Full Access
Question # 17

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

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))

Full Access
Question # 18

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

A.

array[-2:, :]

B.

array[-1:, -1:]

C.

array[-2:, -2:]

D.

array[:, -2:]

Full Access
Question # 19

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

A.

Built-in machine learning algorithms

B.

Automatic data cleaning

C.

Efficient storage and computation

D.

Interactive visualizations

Full Access
Question # 20

Given the following code, what is the expected output?

A.

[10, 20, 30, 40]

B.

[1, 10]

C.

[1, 2, 3, 4]

D.

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

Full Access
Question # 21

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

A.

wgu_list = np.quicksort(arr)

B.

print(wgu_list)

C.

import numpy as np

D.

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

Full Access