
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
WGU D684 INTRODUCTION TO COMPUTER SCIENCE OBJECTIVE ASSESSMENT / WGU D684 OA ACTUAL EXAM 2026/2027 ACCURATE EXAM COMPLETE APPROVED QUESTIONS WITH WELL ELABORATED SOLUTIONS AND DETAILED RATIONALES (100% CORRECT VERIFIED ANSWERS
Typology: Exams
1 / 40
This page cannot be seen from the preview
Don't miss anything!

































1. Which of the following best defines computational thinking? A. Thinking like a computer in binary B. A problem-solving process that includes decomposition, pattern recognition, abstraction, and algorithm design C. Writing code in Python D. Memorizing programming syntax Correct ,,,ANSWER,,,,: B Rationale: Computational thinking is a structured approach to problem-solving that involves decomposing complex problems, recognizing patterns, abstracting irrelevant details, and designing algorithms. It is not limited to coding or syntax memorization. 2. The four pillars of computational thinking are: A. Decomposition B. Pattern recognition
C. Abstraction D. Algorithm design E. Compilation Correct ,,,ANSWER,,,,: A, B, C, D Rationale: These four components form the foundation of computational thinking. Compilation is a process of translating source code into machine code, not a pillar of computational thinking.
3. Breaking a complex problem into smaller, more manageable parts is called: A. Abstraction B. Decomposition C. Pattern recognition D. Algorithm design Correct ,,,ANSWER,,,,: B Rationale: Decomposition is the process of breaking a large, complex problem into smaller, easier-to-solve subproblems. This "divide and conquer" approach makes problem-solving more manageable. 4. What are the four steps of George Pólya's problem-solving method? A. Plan, do, check, act B. Identify, research, develop, evaluate C. Understanding the problem, devising a plan, executing the plan, and reviewing the solution D. Analysis, design, implementation, testing Correct ,,,ANSWER,,,,: C Rationale: Pólya's classic problem-solving method includes: (1) understanding the problem, (2) devising a plan, (3) carrying out the plan, and (4) looking back/reviewing the solution. It is a foundational framework in computational problem-solving.
Correct ,,,ANSWER,,,,: D Rationale: Before any solution can be developed, the problem must be thoroughly understood. This includes identifying what is happening, when it occurs, and what factors contribute to the crash. This is the "understanding the problem" step in Pólya's method.
8. Which of the following best defines an algorithm? A. A programming language used for web development B. A step-by-step set of instructions designed to perform a specific task or solve a problem C. A type of computer hardware component D. A data structure for storing information Correct ,,,ANSWER,,,,: B Rationale: An algorithm is a precise, finite, step-by-step sequence of instructions for solving a problem or performing a task. Algorithms are fundamental to computer science and can be expressed in natural language, pseudocode, flowcharts, or programming languages. 9. Which search algorithm works by checking each element in a list one by one until the target is found or the list ends? A. Binary search B. Sequential search (linear search) C. Selection search D. Bubble search Correct ,,,ANSWER,,,,: B Rationale: Sequential search (also called linear search) examines each element in order from beginning to end. It works on both sorted and unsorted data and has O(n) time complexity, but it is inefficient for large lists compared to binary search. 10. In binary search, what happens if the target value is less than the middle element?
A. The search continues in the left half of the list B. The search continues in the right half of the list C. The search continues from the beginning D. The search ends Correct ,,,ANSWER,,,,: A Rationale: Binary search works by comparing the target to the middle element. If the target is smaller, the algorithm discards the right half and continues searching in the left half. This divide-and-conquer approach gives binary search O(log n) time complexity, but it requires the data to be sorted.
11. What is the primary difference between sorting and searching? A. Searching rearranges data while sorting finds data B. Sorting rearranges data into a specific order while searching locates specific data C. Both perform the same function D. Searching requires more memory than sorting Correct ,,,ANSWER,,,,: B Rationale: Sorting algorithms rearrange data into a specific order (ascending or descending), while searching algorithms locate a specific element within a collection. They are often used together because many search algorithms (like binary search) require sorted data. 12. A programmer is designing an algorithm to find the largest number in a list. What is the most appropriate algorithm design technique? A. Binary search B. Iterative traversal with a comparison variable C. Recursive divide and conquer D. Hash mapping Correct ,,,ANSWER,,,,: B Rationale: To find the maximum value in a list, the most straightforward
Rationale: O(n²) indicates quadratic growth. If the input size doubles, the execution time increases by a factor of four (2² = 4). Examples include bubble sort and insertion sort on unsorted data.
16. A software development team is building a new mobile application. They decide to follow the SDLC model. Which sequence correctly represents the typical SDLC phases? A. Coding → Testing → Design → Requirements → Deployment B. Requirements → Design → Implementation → Testing → Deployment → Maintenance C. Testing → Coding → Design → Maintenance → Requirements D. Implementation → Requirements → Testing → Design → Maintenance Correct ,,,ANSWER,,,,: B Rationale: The standard SDLC phases are: Requirements gathering and analysis → Design → Implementation (coding) → Testing → Deployment → Maintenance. Each phase must be completed before the next begins in a traditional waterfall model. 17. Which SDLC phase involves installing the software in the production environment and making it available to users? A. Testing B. Implementation/Deployment C. Design D. Maintenance Correct ,,,ANSWER,,,,: B Rationale: Deployment (or implementation) is the phase where the completed software is released to users, installed on production servers, and made operational. Maintenance begins after deployment. 18. During the design phase of SDLC, which of the following activities typically occurs? A. Writing the actual program code
B. Defining the system architecture and creating flowcharts/pseudocode C. Fixing bugs reported by users D. Gathering user requirements through interviews Correct ,,,ANSWER,,,,: B Rationale: The design phase translates requirements into technical specifications. This includes architectural design, detailed design of modules, creating flowcharts, writing pseudocode, designing databases, and specifying user interfaces. Coding occurs in the implementation phase.
19. Which of the following flowchart symbols is used to represent a decision point? A. Oval B. Rectangle C. Parallelogram D. Diamond Correct ,,,ANSWER,,,,: D Rationale: Diamonds represent decision points where a condition is evaluated, leading to two or more possible paths (typically yes/no or true/false). Ovals indicate start/end; rectangles are processes; parallelograms are input/output. 20. In a flowchart, which symbol represents the beginning or end of a process? A. Rectangle B. Diamond C. Oval (terminator) D. Parallelogram Correct ,,,ANSWER,,,,: C Rationale: The oval (also called a terminator symbol) marks the start and end points of a flowchart. Rectangles represent processing steps,
Rationale: To check if a number is even or odd, you need a decision symbol (diamond) to evaluate the condition (number % 2 == 0). The diamond connects to processing symbols (rectangles) for the even path and odd path.
24. A programmer has written an algorithm in pseudocode. What is the purpose of pseudocode before actual coding begins? A. To replace the need for documentation B. To provide a human-readable, language-independent representation of the algorithm C. To automatically generate efficient machine code D. To test the program's runtime performance Correct ,,,ANSWER,,,,: B Rationale: Pseudocode uses plain language to describe an algorithm's logic in a way that is independent of any specific programming language. It serves as a bridge between the algorithm design and the actual code, making it easier for humans to understand and validate the logic before coding. 25. Which characteristic distinguishes a count-controlled loop from an event-controlled loop? A. Count-controlled loops run a predetermined number of times; event-controlled loops run until a condition changes B. Count-controlled loops are slower than event-controlled loops C. Count-controlled loops cannot be nested D. Event-controlled loops require a counter variable Correct ,,,ANSWER,,,,: A Rationale: Count-controlled loops (e.g., for loops) execute a fixed number of times based on a counter. Event-controlled loops (e.g., while loops) run until a specific condition changes (e.g., user input sentinel, file end, or sensor value).
Programming Fundamentals (26–45)
26. Which type of variable represents a whole number in computer programming? A. Integer B. Array C. Float D. String Correct ,,,ANSWER,,,,: A Rationale: Integers are data types that represent whole numbers without decimal points or fractional parts (e.g., - 42, 0, 17). Arrays are collections; floats have decimals; strings are text. 27. What describes a named storage location that can hold values that can change during program execution? A. Operand B. Identifier C. Variable D. Constant Correct ,,,ANSWER,,,,: C Rationale: A variable is a named storage location whose contents can be modified as the program runs. Constants hold values that cannot change after assignment. Operands are values or variables used in operations; identifiers are names given to variables, functions, or classes. 28. A programmer defines a variable called PI = 3.14159 and never changes it throughout the program. This is best described as: A. A local variable B. A constant
Correct ,,,ANSWER,,,,: 69 Rationale: Following the order of operations: parentheses first (b / c = 6 ÷ 2 = 3); then multiplication: 3 × 20 = 60; addition: 19 + 60 = 79; subtraction: 79 - 10 = 69. Mathematical operations follow standard precedence: parentheses, exponents, multiplication/division (left-right), then addition/subtraction (left-right).
32. What is the result of integer division: 17 / 5 in a programming language that uses integer division? A. 3. B. 3. C. 3 D. 3. Correct ,,,ANSWER,,,,: C Rationale: Integer division discards the fractional part and returns only the whole number quotient. 17 ÷ 5 = 3 with a remainder of 2, so the integer division result is 3. This behavior is common in languages like C, C++, Java, and Python (with //). 33. In programming, what is the difference between explicit and implicit type conversion? A. Explicit conversion is automatic; implicit conversion requires the programmer to specify B. Implicit conversion is automatic; explicit conversion requires the programmer to manually specify C. Both are automatic in different programming languages D. Neither affects variable values Correct ,,,ANSWER,,,,: B
Rationale: Implicit type conversion (coercion) happens automatically when mixing data types, often with potential loss of precision. Explicit type conversion (casting) requires the programmer to write specific syntax to convert one data type to another, providing greater control.
34. A programmer writes float result = 10 / 3; in a language that performs integer division if both operands are integers. The result is 3.0. How can the programmer obtain the expected value of approximately 3.333? A. Write float result = 10.0 / 3; (explicit use of floating-point literal) B. Write int result = 10 / 3; C. There is no way to obtain a floating-point result D. The language automatically handles this correctly in all cases Correct ,,,ANSWER,,,,: A Rationale: By making at least one operand a floating-point number (e.g., 10.0 / 3 or 10 / 3.0), the language performs floating-point division instead of integer division. This is a common technique when precise fractional results are needed. 35. Which data type would be most appropriate to store a person's name? A. Integer B. Float C. String D. Boolean Correct ,,,ANSWER,,,,: C Rationale: Strings are sequences of characters used to represent text, such as names, addresses, or any alphanumeric information. Integers store whole numbers; floats store decimals; booleans store true/false values. 36. What is the value of the Boolean expression (5 > 3) AND (10 < 20)? A. True B. False
C. my_variable D. my variable Correct ,,,ANSWER,,,,: C Rationale: Most programming languages require variable names to start with a letter or underscore, cannot start with a digit, cannot contain spaces, and often cannot use hyphens (which may be interpreted as subtraction operators). Underscores are allowed. Meaningful names are also encouraged.
40. A programmer needs to store a list of 100 test scores. Which data structure would be most appropriate? A. Boolean B. Character C. Array D. Floating-point variable Correct ,,,ANSWER,,,,: C Rationale: An array is a collection of elements of the same data type stored in contiguous memory locations. It allows efficient access using an index. For a list of 100 test scores, an array is ideal because it organizes multiple values under a single name. 41. What is the index of the first element in most programming languages' arrays? A. 0 B. 1 C. - 1 D. It varies by element value Correct ,,,ANSWER,,,,: A Rationale: Most programming languages (C, C++, Java, Python, JavaScript) use zero-based indexing, meaning the first element in an array is at index 0. Some languages (e.g., MATLAB, Fortran, Lua) use 1-based
indexing. However, zero-based is more common in general-purpose languages.
42. An array called grades contains 5 elements. What is the valid index range for this array in a zero-based language? A. 1 to 5 B. 0 to 4 C. 0 to 5 D. 1 to 4 Correct ,,,ANSWER,,,,: B Rationale: In zero-based indexing, the first element is at index 0, and the last element is at index N-1, where N is the number of elements. For an array of size 5, valid indices are 0, 1, 2, 3, and 4. 43. Which of the following is true about arrays? A. Arrays can only store numeric values B. Arrays are heterogeneous (can store different data types in the same array) C. Arrays are homogeneous (all elements must be the same data type) D. Arrays cannot be modified after creation Correct ,,,ANSWER,,,,: C Rationale: In static typing languages like C, Java, and C++, arrays are homogeneous — all elements must be of the same data type. Some dynamic languages (Python, JavaScript) allow mixed types in lists (the equivalent data structure), but classic arrays are homogeneous. 44. A programmer needs to store a single value that can only be true or false. Which data type should be used? A. Integer B. String C. Float D. Boolean
47. What is the binary representation of the decimal number 13? A. 1101 B. 1110 C. 1011 D. 1111 Correct ,,,ANSWER,,,,: A Rationale: 13 decimal → binary: 13 ÷ 2 = 6 remainder 1 (LSB), 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Reading from last remainder to first: 1101. Check: 8 + 4 + 0 + 1 = 13. 48. Which of the following best describes analog data? A. Data that is stored as binary digits 0 and 1 B. Data that is continuous and can take any value within a range C. Data that is represented only by integers D. Data that is encrypted for security Correct ,,,ANSWER,,,,: B Rationale: Analog data is continuous, representing real-world physical quantities that vary smoothly (e.g., sound waves, temperature, light intensity). Digital data represents these signals using discrete values, typically binary digits (0 and 1). 49. What is the primary characteristic of digital data? A. It is continuous and infinite B. It is represented using discrete values, typically binary (0s and 1s) C. It cannot be transmitted over the internet D. It requires analog-to-digital conversion for all types of storage Correct ,,,ANSWER,,,,: B Rationale: Digital data uses discrete, finite values — most commonly binary digits (bits). This discrete nature allows for reliable storage, processing, and transmission without the degradation that analog signals experience.
50. How many bits are required to represent the decimal number 255 in binary? A. 4 bits B. 6 bits C. 8 bits D. 10 bits Correct ,,,ANSWER,,,,: C Rationale: 255 in decimal is 11111111 in binary, which uses 8 bits. One byte (8 bits) can represent values from 0 to 255. 2⁸ = 256 possible values (0 through 255). 51. Which character encoding standard assigns a unique number to every character used in modern computing, supporting over 143, characters? A. ASCII B. EBCDIC C. Unicode D. Binary Correct ,,,ANSWER,,,,: C Rationale: Unicode is a universal character encoding standard that assigns a unique code point to every character across all writing systems, including emojis and historical scripts. ASCII (American Standard Code for Information Interchange) uses only 7 or 8 bits and supports only 128- 256 characters, primarily English. 52. ASCII stands for: A. American Standard Code for Information Interchange B. Automated System for Computer Information Integration C. Advanced Standard Code for Information Interchange D. American Secure Code for Information Interchange Correct ,,,ANSWER,,,,: A