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

Foundations-of-Computer-Science Questions and Answers

Question # 6

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

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.

Full Access
Question # 7

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 # 8

m = 30

n = 30

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

A.

Two identical numbers

B.

Two different numbers

C.

0 0

D.

Error

Full Access
Question # 9

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 # 10

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

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

Full Access
Question # 11

What is the component of the operating system that manages core system resources but allows no user access?

A.

The kernel

B.

The File Explorer

C.

User interface layer

D.

Device driver manager

Full Access
Question # 12

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

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".

Full Access
Question # 13

Which sorting algorithm works by finding the smallest or largest element in an unsorted part of a list and moving it to the sorted part of the list?

A.

Radix sort

B.

Heap sort

C.

Quicksort

D.

Selection sort

Full Access
Question # 14

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

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

Full Access
Question # 15

What will the expression fam[3:6] return?

A.

A list with elements at index 4, 5, and 6

B.

A list with elements at index 3, 4, 5, and 6

C.

A list with elements at index 3, 4, and 5

D.

A list with elements at index 6

Full Access
Question # 16

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?

A.

np_2d[:, 2]

B.

np_2d[:, 1]

C.

np_2d[2, :]

D.

np_2d[1, :]

Full Access
Question # 17

Which file system is commonly used in Windows and supports file permissions?

A.

NTFS

B.

FAT32

C.

HFS+

D.

EXT4

Full Access
Question # 18

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

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.

Full Access
Question # 19

What is the first step in the selection sort algorithm?

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.

Full Access
Question # 20

Which process is designed to establish the identity of the user such as with a username and password?

A.

Certification

B.

Verification

C.

Authentication

D.

Registration

Full Access
Question # 21

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

A.

"True"

B.

"true"

C.

True

D.

true

Full Access