OBJECTIVE ASSESSMENT - EXAM
WGU D278 Final Exam Prep
Scripting and Programming - Foundations
QUESTIONS VERIFIED ANSWERS EDITION PASSING SCORE
75 100% 2026/2027 80%
TOPICS COVERED
* Programming Fundamentals & Logic * Functions, Modules & Error Handling
* Data Types, Variables & Expressions * Object-Oriented Programming & Data Structures
* Control Structures & Algorithms
COVER PAGE - 1
, Section 1: Programming Fundamentals & Logic Section 1 of 5
QUESTION 1
A junior developer is writing pseudocode to calculate the total cost of items in a shopping cart. She
needs to break down the problem into smaller, manageable steps before writing actual code. Which
programming concept involves creating a step-by-step plan or blueprint that outlines the logic and
sequence of operations before implementation?
A. Debugging
B. Algorithm Design
C. Code Compilation
D. Syntax Checking
Correct Answer: B
Rationale:
Algorithm Design is the process of creating a step-by-step plan or blueprint that outlines the logic and sequence of operations
to solve a problem. Debugging identifies and fixes errors in existing code, while compilation translates source code into
machine code.
QUESTION 2
A student is learning about how computers process information and encounters the term that describes
the fundamental building blocks of digital data represented as either 0 or 1. Which binary digit serves as
the smallest unit of data in computing and forms the basis of all digital information?
A. Byte
B. Bit
C. Nibble
D. Word
Correct Answer: B
Rationale:
A Bit (binary digit) is the smallest unit of data in computing, representing either 0 or 1. A byte consists of 8 bits, a nibble is 4
bits, and a word is a fixed-size group of bits that varies by processor architecture.
QUESTION 3
A software team is documenting a new inventory management system. They need to create visual
representations showing how data flows between modules, how users interact with the system, and how
processes are sequenced. Which type of diagram uses standardized symbols to represent processes,
decisions, and data flow in a program?
A. UML Class Diagram
B. Flowchart
C. Entity-Relationship Diagram
D. Network Topology Diagram
Correct Answer: B
Rationale:
A Flowchart uses standardized symbols to represent the sequence of operations, decisions, and data flow in a program or
, process. UML class diagrams show object-oriented structure, while entity-relationship diagrams model da
QUESTION 4
A developer is analyzing a payroll calculation program and notices that the gross pay is computed by
multiplying hours worked by hourly rate, then deducting taxes based on tax brackets, and finally adding
any overtime bonuses. Which programming concept describes the transformation of input data through a
series of defined operations to produce output?
A. Data Abstraction
B. Input-Process-Output (IPO) Model
C. Polymorphism
D. Encapsulation
Correct Answer: B
Rationale:
The Input-Process-Output (IPO) Model describes how programs receive input, process it through defined operations, and
produce output. Data abstraction hides implementation details, while polymorphism and encapsulation are object-oriented
concepts unrelated to the basic data flow model.
QUESTION 5
A computer science instructor explains that before a program written in Python can execute, the source
code must be translated into instructions the computer's processor can understand. Which process
converts high-level programming language code into machine-readable instructions?
A. Interpretation
B. Compilation
C. Encryption
D. Compression
Correct Answer: B
Rationale:
Compilation translates high-level source code into machine code or an intermediate form that the computer can execute.
Interpretation executes code line by line without producing a separate machine code file. Encryption and compression are
unrelated to code translation.
QUESTION 6
A programmer is reviewing legacy code and discovers a section where the same sequence of five
operations is repeated twelve times with only the variable names changing. Which programming principle
recommends writing the logic once and reusing it rather than duplicating code throughout the program?
A. Inheritance
B. DRY Principle (Don't Repeat Yourself)
C. Recursion
D. Parallel Processing
Correct Answer: B
Rationale:
The DRY Principle (Don't Repeat Yourself) advocates writing logic once and reusing it through functions, methods, or modules
rather than duplicating code. Inheritance is an OOP concept for code reuse between classes, while recursion is a technique for
solving problems by breaking them into smaller instances.