Aug 30, 2026 PASS WGU Foundations-of-Computer-Science EXAM WITH UPDATED DUMPS [Q36-Q52]

Share

Aug 30, 2026 PASS WGU Foundations-of-Computer-Science EXAM WITH UPDATED DUMPS

Foundations-of-Computer-Science Questions PDF [2026] Use Valid New dump to Clear Exam

NEW QUESTION # 36
Which file system is commonly used in Windows and supports file permissions?

  • A. FAT32
  • B. HFS+
  • C. NTFS
  • D. EXT4

Answer: C

Explanation:
Windows commonly uses the NTFS (New Technology File System) for internal drives and many external drives because it supports advanced features required for modern operating systems. One of the most important features is support forfile and folder permissionsvia Access Control Lists (ACLs). Permissions enable the OS to enforce security policies by controlling which users and groups can read, write, execute, modify, or delete specific resources. This is fundamental to multi-user security and is a standard topic in operating systems and security textbooks.
FAT32 is an older file system designed for simplicity and broad compatibility. It does not provide the same fine-grained permission model as NTFS, which is why it is often used for removable media where cross- platform compatibility matters more than access control. HFS+ is historically associated with Apple's macOS systems, and EXT4 is widely used on Linux. While these file systems have their own permission and feature models, they are not the common Windows default for permission-managed storage in typical Windows deployments.
NTFS also supports journaling (improving reliability after crashes), large file sizes, quotas, compression, and encryption features (through Windows facilities). In enterprise environments, NTFS permissions integrate with Windows authentication and directory services, enabling centralized user management. Therefore, for Windows systems requiring file permissions, NTFS is the correct answer.


NEW QUESTION # 37
Which line of code below contains an error in the use of NumPy?

  • A. arr = np.array([3, 2, 0, 1])
  • B. wgu_list = np.quicksort(arr)
  • C. import numpy as np
  • D. print(wgu_list)

Answer: B

Explanation:
The NumPy library provides arrays and efficient numerical operations, including sorting. However, NumPy doesnotprovide a function named np.quicksort. That is the API misuse in the code, making option A the correct answer. In NumPy, sorting is commonly performed using np.sort(arr) (which returns a sorted copy) or arr.sort() (which sorts in-place). If a specific algorithm is desired, NumPy exposes it through the kind parameter, such as np.sort(arr, kind="quicksort"), kind="mergesort", or kind="heapsort". Textbooks present this as a typical design: a single sorting interface with selectable strategies, rather than separate top-level functions per algorithm name.
Option C is correct and necessary: import numpy as np is standard convention. Option B is also correct:
printing a variable is valid assuming it exists. Option D, written as arr = np.array([3, 2, 0, 1]), is valid NumPy usage for constructing a 1D array from a Python list.
A subtle point taught in scientific computing courses is that library APIs matter as much as syntax: you can write perfectly valid Python that still fails if you call a function that the library does not define. In this case, the fix is to replace np.quicksort(arr) with np.sort(arr) or np.sort(arr, kind="quicksort") depending on whether you need to specify the algorithm.


NEW QUESTION # 38
What is the expected output of numpy_array[1]?

  • A. The second element of the array
  • B. The first element of the array
  • C. An error message in the array
  • D. A display of the entire array

Answer: A

Explanation:
In Python and NumPy, indexing iszero-based, meaning the first element of a 1D sequence is at index 0, the second element is at index 1, and so on. A NumPy array behaves like a sequence for basic indexing, so numpy_array[1] returns the element stored at position 1 in the array. This is a fundamental concept taught in introductory programming and scientific computing: indexing selects a single element, while slicing selects a range.
For example, if numpy_array = np.array([5, 8, 13]), then numpy_array[0] is 5, numpy_array[1] is 8, and numpy_array[2] is 13. The expression numpy_array[1] therefore evaluates to thesecond element(8 in this example). This does not display the entire array (that would happen with print(numpy_array)), and it does not produce an error unless the array is too short. An error such as IndexError occurs only if index 1 is out of bounds, for example when the array has length 1 and you try to access numpy_array[1].
Textbooks emphasize careful reasoning about indices because off-by-one errors are common. In data analysis, correct indexing is crucial for extracting the right observations, features, or time steps from numerical datasets.


NEW QUESTION # 39
Which aspect of a security policy would define the ramifications of abusing company resources?

  • A. Data Retention Policy
  • B. Network Security Policy
  • C. Physical Security Policy
  • D. Acceptable Use Policy

Answer: D

Explanation:
AnAcceptable Use Policy (AUP)defines how employees and users are permitted to use an organization's computing resources-such as email, internet access, file storage, endpoints, and networks-and it typically specifies prohibited behaviors and the consequences of violations. In security and IT governance textbooks, the AUP is framed as both a behavioral contract and a risk-management tool: it reduces misuse, clarifies expectations, and provides an enforceable basis for disciplinary action.
The "ramifications of abusing company resources" (for example, installing unauthorized software, excessive personal use, accessing inappropriate content, attempting to bypass security controls, or sharing credentials) are precisely the kinds of issues an AUP addresses. The policy often includes monitoring statements (users have limited expectation of privacy), compliance requirements, and escalation paths for violations.
A Network Security Policy (A) focuses on technical rules for network protection-firewalls, segmentation, remote access, and intrusion detection-rather than broad user conduct and disciplinary consequences. A Physical Security Policy (B) addresses protection of facilities and hardware-badges, locks, visitor procedures, secure areas. A Data Retention Policy (D) defines how long data is stored, how it is archived, and how it is disposed, which is different from defining misuse consequences.
Thus, the policy aspect that defines permissible behavior and the consequences for abusing resources is the Acceptable Use Policy.


NEW QUESTION # 40
Which statement describes the relationship between trees and graphs?

  • A. Trees do not have levels.
  • B. Trees cannot have cycles.
  • C. Trees can have cycles.
  • D. Trees can have unconnected nodes.

Answer: B

Explanation:
In discrete mathematics and computer science, atreeis a special kind ofgraph. The standard graph-theory definition is that a tree is aconnected, acyclicundirected graph. "Acyclic" means it containsno cycles, i.e., you cannot start at a vertex, follow a sequence of edges, and return to the starting vertex without repeating edges in a way that forms a loop. (Wikipedia) This property is exactly what makes option D correct.
The other options contradict the definition. If a structure has cycles, it is not a tree (though it may still be a graph). If it has unconnected nodes, it is not connected; such a structure is more like aforest(a disjoint union of trees) rather than a single tree. (Wikipedia) The idea of "levels" belongs to a particular computer-science representation called arooted tree, where one node is chosen as the root and nodes can be assigned depths
/levels based on distance from the root. But levels are not required in the abstract definition of a tree as a graph; they arise from choosing a root and orientation for convenience in algorithms like BFS/DFS, heaps, and parse trees.
So, the relationship is: every tree is a graph with extra structure-specifically, no cycles and (typically) connectivity-and the "no cycles" rule is the key distinguishing feature. (Discrete Mathematics)


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

  • A. array[-2:, :]
  • B. array[-2:, -2:]
  • C. array[:, -2:]
  • D. array[-1:, -1:]

Answer: B

Explanation:
NumPy slicing uses the same start/stop rules as Python sequences, and it also supports negative indices to count from the end. In a 2D array, slicing is written as array[rows, columns]. To get thelast two rows, you use
-2: in the row position, meaning "start two rows from the end and go to the end." Similarly, to get thelast two columns, you use -2: in the column position. Combining these gives array[-2:, -2:], which selects the bottom- right 2×2 subarray.
Option A, array[-2:, :], selects the last two rows butall columns, so it is not restricted to the last two columns.
Option D, array[:, -2:], selects all rows but only the last two columns. Option B, array[-1:, -1:], selects only the last row and the last column, producing a 1×1 (or 1×1 view) subarray, not a 2×2.
This kind of slicing is widely taught because it is essential for matrix operations, extracting submatrices, working with sliding windows, and manipulating image or time-series data where "take the last k observations/features" is common. Negative indexing reduces errors and makes code clearer, especially compared with computing explicit indices like array[rows-2:rows, cols-2:cols].


NEW QUESTION # 42
Which Python command can be used to display the results of calculations?

  • A. compute()
  • B. print()
  • C. solve()
  • D. result()

Answer: B

Explanation:
In Python, the standard way to display output to the console is the built-in function print(). When a program performs calculations-such as arithmetic expressions, function results, or computed statistics-print() can be used to show those results to the user. For example, print(2 + 3) displays 5, and print(total / count) displays the computed average. Textbooks introduce print() early because it supports interactive learning, debugging, and communicating program behavior.
print() can display one or multiple items separated by commas, automatically converting them to string form.
It also supports formatting via f-strings (e.g., print(f"Sum = {s}")) and optional parameters like sep and end to control output formatting. This makes it versatile for reporting calculated values, intermediate steps in algorithms, and final program outputs.
The other options are not standard Python built-ins for output. compute(), result(), and solve() are not universally defined commands in Python; they might exist as user-defined functions or in specific libraries, but they are not the general command taught in textbooks for displaying results. Python follows a clear separation: expressions compute values; print() displays them.
Therefore, the correct answer is print(), as it is the primary mechanism for producing human-readable output from calculations in typical Python programs and coursework.


NEW QUESTION # 43
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]

Answer: D

Explanation:
In a 2D NumPy array, rows and columns represent different dimensions of the data. The indexing form array
[row_selection, column_selection] allows you to select entire rows, entire columns, or submatrices. The slice :
means "all indices along this dimension." Since each row corresponds to a family member (a person), selecting weights forallfamily members means selectingall rowsfor the weight column.
The problem states the columns are ordered as: Age (column 0), Weight (column 1), Height (column 2).
Therefore, the weight column has index 1. The expression np_2d[:, 1] uses : to take every row and 1 to take the second column, producing a 1D array (or a column view) containing the weight values for all people.
Option A, np_2d[:, 2], would select the height column, not weight. Option C, np_2d[2, :], selects the third row (the third person) and all columns-age, weight, and height for just that one person. Option D, np_2d[1, :], selects the second person's entire row.
This column selection technique is fundamental in data analysis because datasets are often stored as
"rows = observations, columns = features," and extracting a feature vector is a frequent operation before computing statistics or building models.


NEW QUESTION # 44
How is the NumPy package imported into a Python session?

  • A. using numpy
  • B. import numpy as np
  • C. include numpy
  • D. import num_py

Answer: B

Explanation:
In Python, external libraries are brought into a program using the import statement. NumPy, which provides the ndarray type and a large collection of numerical computing functions, is conventionally imported with an alias for convenience. The standard and widely taught pattern is import numpy as np. This imports the numpy module and binds it to the shorter name np, making code more readable and reducing repeated typing, especially in mathematical expressions such as np.array(...), np.mean(...), or np.dot(...).
Option A is incorrect because the module name is numpy, not num_py. Options C and D resemble syntax from other languages (for example, "using" in C# or "include" in C/C++), but they are not valid Python import mechanisms. Python's module system is based on imports, and the aliasing feature (as np) is built into the import statement.
Textbooks also emphasize that importing a package requires that it be installed in the active Python environment. If NumPy is not installed, import numpy as np will raise an ImportError (or ModuleNotFoundError in modern Python). Once imported, the alias np is used consistently in scientific computing materials, notebooks, and professional data analysis codebases, which is why this option is considered the correct and expected answer.


NEW QUESTION # 45
Which protocol provides encryption while email messages are in transit?

  • A. HTTP
  • B. TLS
  • C. IMAP
  • D. FTP

Answer: B

Explanation:
"Encryption in transit" means protecting data while it moves across a network so that eavesdroppers cannot read or modify it. For email systems, this protection is most commonly provided byTLS (Transport Layer Security). TLS is a cryptographic protocol that can wrap application protocols (including mail protocols) to provide confidentiality, integrity, and server (and sometimes client) authentication. In practice, TLS is used to secure connections such as SMTP submission (often with STARTTLS or implicit TLS), IMAP over TLS, and POP3 over TLS. Textbooks present TLS as the standard successor to SSL and the foundation of secure communication on the modern Internet.
The other options are not correct in this context. FTP is a file transfer protocol and is traditionally unencrypted unless paired with additional security mechanisms (e.g., FTPS, which uses TLS, or SFTP, which uses SSH). HTTP is a web protocol; it becomes encrypted only when used as HTTPS, which again relies on TLS underneath. IMAP is an email retrieval protocol, butIMAP itself is not the encryption protocol- IMAP can be run over TLS (IMAPS) to become secure.
Therefore, the protocol that provides encryption while email messages (or email protocol traffic) are in transit is TLS.


NEW QUESTION # 46
What stores the location of the next node in a linked list?

  • A. The header
  • B. The index
  • C. The value
  • D. The pointer

Answer: D

Explanation:
A linked list is a dynamic data structure made up of nodes, where each node typically contains two components: a data field (the value being stored) and a link field (commonly called a pointer or reference).
The pointer's role is to store the memory address (or reference) of the next node in the sequence, thereby maintaining the logical order of the list even though nodes may be scattered throughout memory. This is a key contrast with arrays, which store elements contiguously and rely on index arithmetic to locate the next element.
Because each node explicitly points to the next node, linked lists support efficient insertion and deletion operations compared with arrays. To insert a node, you allocate it and then adjust pointers so it fits into the chain. To delete a node, you redirect the pointer of the previous node to skip over the removed node.
Traversal is performed by starting at the head node and repeatedly following the pointer until a null reference indicates the end of the list.
The other options do not correctly describe what stores the location of the next node. An index is used in array-like structures, not in a standard linked list node. The value is the payload data, not the link.
The "header" (often called the head pointer) is an external reference to the first node, not the field inside each node that links to the next. Therefore, the correct answer is the pointer.


NEW QUESTION # 47
How is a NumPy array named data with 6 elements reshaped into a 2x3 array?

  • A. np.reshape(data, (2, 3))
  • B. data.set_shape(2, 3)
  • C. np_reshape(list, (2, 3))
  • D. data_reshape[2, 3]

Answer: A

Explanation:
Reshaping is the operation of changing the "view" of an array so that the same elements are arranged with new dimensions. In NumPy, reshaping is possible when the total number of elements stays the same. A 2x3 array contains 6 elements, so a 1D array data of length 6 can be reshaped into shape (2, 3) without adding or removing values. Textbooks stress this invariant: the product of the dimensions must equal the original size.
NumPy provides two standard reshaping interfaces: the function np.reshape(data, (2, 3)) and the method data.
reshape(2, 3) (or data.reshape((2, 3))). Option A is correct because it uses the official NumPy function with the proper arguments: the original array and the target shape. The shape is passed as a tuple describing rows and columns.
Option B is incorrect because np_reshape is not the correct NumPy function name, and it references an unrelated identifier list. Option C is incorrect because NumPy arrays do not provide a set_shape method like that. Option D is not valid NumPy syntax for reshaping.
Reshaping is fundamental in data analysis and machine learning: it converts flat vectors into matrices, prepares batches of samples, and aligns dimensions for matrix multiplication and broadcasting.


NEW QUESTION # 48
What is the only content that will display if the List folder contents permission is not enabled for a particular folder in Windows 11?

  • A. Files with Read permission
  • B. The folder's creation date
  • C. The folder's author
  • D. Files with Write permission

Answer: B

Explanation:
In Windows file security (NTFS permissions), "List folder contents" controls whether a user cansee the names of files and subfoldersinside a folder. If a user does not have permission to list a folder, Windows prevents directory enumeration: the user cannot browse the folder and view what is inside. (2BrightSparks) This is a key concept in access control: it separates "being able to traverse to a location" from "being able to see what is stored there." When "List folder contents" is not enabled, the user typically cannot view the list of files regardless of whether individual files might have separate permissions. In standard user-facing behavior, what remains visible in the folder's properties and metadata is limited; among the choices given, the only item that is reliably a folder-level metadata attribute (and not a listing of contents) is the folder'screation date. The
"author" is not a universal, reliably displayed NTFS folder property, and options C and D talk about files (contents), which cannot be listed without the list permission. (2BrightSparks) This reflects a broader textbook principle: operating systems enforce access control both on objects (files/folders) and on operations (read data, write data, list directory). Removing the list operation blocks visibility of contents, even if other permissions exist elsewhere.


NEW QUESTION # 49
Which statement describes the data type restriction found in most NumPy arrays?

  • A. NumPy arrays can only hold integer data types.
  • B. NumPy arrays adapt to the most complex data type on the fly.
  • C. NumPy arrays must be of the same type of data.
  • D. NumPy arrays are restricted to string data types only.

Answer: C

Explanation:
Most NumPy arrays enforce a key constraint: all elements share the samedtype(data type). This uniform typing is foundational to NumPy's performance model. Because each element has the same size and representation, NumPy can store the array in a contiguous memory block and apply low-level, vectorized operations efficiently. This is why NumPy is widely used for numerical computing, statistics, and data analysis: operations like addition, multiplication, and reductions (sum/mean) can be implemented in optimized compiled code without per-element Python overhead.
Option B captures this textbook principle: elements in a typical ndarray are of the same data type. The other options are incorrect. NumPy is not restricted to strings (A), and it is not limited to integers (C); it supports floats, complex numbers, booleans, fixed-width strings, datetime types, and many others. Option D is misleading: NumPy does not continuously "adapt on the fly" during normal use. The dtype is generally fixed once the array exists. What NumPydoesdo is choose an appropriate common dtype when you create an array from mixed inputs (for example, mixing ints and floats yields floats). But after creation, assignments are cast into the existing dtype rather than dynamically changing the dtype to accommodate new values.
This restriction is precisely what differentiates NumPy arrays from Python lists and enables predictable memory layout and fast numerical computation.


NEW QUESTION # 50
What is an ndarray in Python?

  • A. A native Python object that represents a tree-like hierarchical data structure.
  • B. A module that provides network socket functions similar to XML.
  • C. A built-in Python data array used to store collections of items.
  • D. An n-dimensional array object provided by the NumPy library.

Answer: D

Explanation:
An ndarray is NumPy's fundamental data structure: ann-dimensional arraydesigned for efficient numerical computation. The term stands for "N-dimensional array," and it is implemented as numpy.ndarray. Unlike Python's built-in list, an ndarray stores elements in a compact, homogeneous format defined by its dtype (such as integers or floating-point numbers). This uniform representation enables fast, vectorized operations and efficient use of memory, which is why ndarray is central in scientific computing and data analysis.
An ndarray supports multiple dimensions: a 1D array behaves like a vector, a 2D array like a matrix (rows and columns), and higher-dimensional arrays represent tensors. Textbooks emphasize that ndarray operations are typically element-wise by default (for example, a + b adds corresponding elements), and that slicing and broadcasting allow powerful computations without explicit loops. This approach is both expressive and efficient because the heavy lifting happens in optimized low-level code.
Option A is incorrect because ndarray is not built into core Python; it comes from NumPy. Option B describes a tree, which is a different data structure entirely. Option D is incorrect because sockets and XML-related functionality belong to other parts of Python's standard library, not to NumPy or ndarray.
In short, an ndarray is the primary array object of NumPy, providing high-performance multi- dimensional numerical storage and computation.


NEW QUESTION # 51
What is the method for changing an element in a Python list?

  • A. Use curly brackets and the equals sign
  • B. Use square brackets and the equals sign
  • C. Use the del keyword and the element's value
  • D. Use parentheses and the plus sign

Answer: B

Explanation:
In Python, a list is a mutable sequence, meaning its elements can be changed after the list is created. The standard textbook method for updating a specific element isindex assignment, which uses square brackets to select the position and the equals sign to assign a new value. For example, if nums = [10, 20, 30], then nums
[1] = 99 changes the element at index 1 from 20 to 99, producing [10, 99, 30]. This works because lists store references to objects and allow those references to be updated in-place.
Option B is incorrect because parentheses are used for function calls and tuples, and the plus sign typically performs concatenation (creating a new list) rather than modifying an existing element by position. Option C is incorrect because curly brackets denote dictionaries or sets, not lists. Option D is incorrect because del removes elements by index or slice (for example, del nums[1]), and it does not delete by "the element's value" unless you first find the index. Deleting is not the same as changing; deletion reduces the list's length and shifts later indices.
Index assignment is fundamental in list manipulation and appears in standard algorithms: updating counters, replacing sentinel values, editing collections, and implementing in-place transformations efficiently without allocating a new list.


NEW QUESTION # 52
......

Foundations-of-Computer-Science Study Guide Brilliant Foundations-of-Computer-Science Exam Dumps PDF: https://www.testkingfree.com/WGU/Foundations-of-Computer-Science-practice-exam-dumps.html

Passing WGU Foundations-of-Computer-Science Exam Using 2026 Practice Tests: https://drive.google.com/open?id=1PyRw9TUsjDbCszIiU7R7KG3cTFJlpHwr