P.S. Fast2test在Google Drive上分享了免費的2026 WGU Foundations-of-Computer-Science考試題庫:https://drive.google.com/open?id=1mUYT69m-HX6U1Eaut_cLX8RhKpSZGj65
選擇我們Fast2test就是選擇成功!Fast2test為你提供的WGU Foundations-of-Computer-Science 認證考試的練習題和答案能使你順利通過考試。WGU Foundations-of-Computer-Science 認證考試的考試之前的模擬考試時很有必要的,也是很有效的。如果你選擇了Fast2test,你可以100%通過考試。
| Section | Objectives |
|---|---|
| Topic 1: Programming Foundations | - Language Concepts Overview
|
| Topic 2: Data & Security Basics | - Security Fundamentals
|
| Topic 3: Computer Science Fundamentals | - Data Structures Introduction
|
| Topic 4: Operating Systems & Architecture | - OS Fundamentals
|
>> 最新WGU Foundations-of-Computer-Science試題 <<
Fast2test的專業及高品質的產品是提供IT認證資料的行業佼佼者,選擇了Fast2test就是選擇了成功,Fast2test WGU的Foundations-of-Computer-Science考試培訓資料是保證你通向成功的法寶,有了它你將取得優異的成績,並獲得認證,走向你的理想之地。
問題 #35
How can someone subset the last two rows and columns of a 2D NumPy array?
答案:D
解題說明:
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].
問題 #36
What is the correct way to represent a boolean value in Python?
答案:D
解題說明:
Python has a built-in boolean type named bool, which has exactly two values: True and False. These are language keywords/constants and are case-sensitive. Therefore, the correct representation of a boolean value is True (capital T, lowercase rest) or False (capital F). This is consistently taught in introductory programming textbooks because it affects conditional statements (if, while), logical operations (and, or, not), and comparisons.
Option A, "True", is a string literal, not a boolean. While it visually resembles the boolean constant, it behaves differently: non-empty strings are "truthy" in conditions, but "True" == True is false because they are different types (str vs bool). Option B, "true", is also a string, and it differs in casing as well. Option D, true, is not valid in Python; it will raise a NameError unless a variable named true has been defined.
Textbooks also stress that boolean values often result from comparisons, such as x > 0, and that booleans are a subtype of integers in Python (True behaves like 1 and False like 0 in arithmetic contexts). Still, their primary use is representing logical truth values for control flow and decision- making.
問題 #37
What will be the result of performing the slice fam[:3]?
答案:A
解題說明:
Python slicing uses the notation sequence[start:stop], where start is inclusive and stop is exclusive. When start is omitted, it defaults to 0, meaning the slice starts from the beginning of the sequence. Therefore, fam[:3] is equivalent to fam[0:3]. Because the stop index 3 is excluded, the slice includes elements at indices 0, 1, and
2-exactly the first three elements.
This convention is emphasized in programming textbooks because it makes many tasks natural and reduces boundary errors. For example, "take the first n items" is written as [:n], and "drop the first n items" is written as [n:]. The length of the slice is also easy to reason about: with step 1, it is stop - start, so here it is 3 - 0 = 3.
Option B is incorrect because including four elements would require fam[:4]. Option C would correspond to fam[:2]. Option D describes taking elements from the end, which would use negative indexing such as fam
[-3:].
Slicing is widely used for batching, windowing in algorithms, splitting datasets into training/testing segments, and extracting prefixes in parsing tasks. Understanding the inclusive start and exclusive stop rule is essential for correct Python programming.
問題 #38
What is the built-in data structure that implements a hash table in Python?
答案:B
解題說明:
A hash table is a data structure that supports fast lookup, insertion, and deletion by using ahash functionto map keys to positions in an underlying storage structure. In Python, the built-in data structure that provides hash-table behavior is thedictionary, written with curly braces like {"a": 1, "b": 2}. Dictionaries store key- value pairs and are designed so that accessing a value by key, such as d["a"], is efficient on average.
Textbooks typically describe this expected efficiency as average-case constant time, often written as O(1), assuming a good hash function and a well-managed table size.
Tuples and lists are sequence types. Lists provide indexed access by integer position, not hashing by arbitrary keys. Tuples are immutable sequences and likewise do not provide key-based hashing semantics. "Array" is not the core built-in mapping structure in Python; while Python has an array module and NumPy has arrays, neither is the built-in hash table abstraction for general key-value storage.
Python dictionaries require keys to be hashable, meaning the key's hash value is stable during its lifetime (common examples: strings, numbers, tuples of hashable items). This requirement is directly tied to hash-table implementation. Dictionaries are used throughout computer science applications:
symbol tables in interpreters, caches and memoization, frequency counting, indexing, and implementing graphs via adjacency maps.
問題 #39
What is the expected output of calling .shape on a NumPy 2D array?
答案:A
解題說明:
In NumPy, every ndarray has a shape attribute that describes the size of the array along each dimension. For a
2D array, shape returns a tuple with two integers: (number_of_rows, number_of_columns). For example, if a
= np.array([[1, 2, 3], [4, 5, 6]]), then a.shape is (2, 3), meaning 2 rows and 3 columns. This is a fundamental idea in matrix and array computing, because shape governs how indexing, slicing, broadcasting, and linear algebra operations behave.
Option A describes the dtype, which can be accessed with a.dtype, not a.shape. Option C is incorrect because shape provides per-dimension sizes, not their sum. Option D refers to the total number of elements, which NumPy provides via a.size (or equivalently np.prod(a.shape)).
Textbooks emphasize shape because many errors in numerical computing come from mismatched dimensions. For example, matrix multiplication requires compatible inner dimensions, and broadcasting rules depend on dimension sizes. By checking .shape, programmers can verify their data layout before applying algorithms, ensuring rows represent observations and columns represent features (or vice versa). Thus, for a 2D NumPy array, .shape indicates the number of rows and columns.
問題 #40
......
隨著社會的發展,現在WGU行業得到了人們的青睞,也有越來越多的人們想考取WGU方面的資格認證證書,在事業上更進一步。這個時候你應該想到的是Fast2test網站,它是你Foundations-of-Computer-Science考試合格的好幫手。Fast2test的強大考古題是Foundations-of-Computer-Science技術專家們多年來總結出來的經驗和結果,站在這些前人的肩膀上,會讓你離成功更進一步。
Foundations-of-Computer-Science熱門認證: https://tw.fast2test.com/Foundations-of-Computer-Science-premium-file.html
順便提一下,可以從雲存儲中下載Fast2test Foundations-of-Computer-Science考試題庫的完整版:https://drive.google.com/open?id=1mUYT69m-HX6U1Eaut_cLX8RhKpSZGj65