Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 27 pages
Exam (elaborations)

WGU D278 Scripting and Programming Foundations Pre-Assessment V2 Exam Actual Exam 2026/2027 – Complete Exam-Style Questions | Detailed Rationales – Pass Guaranteed – A+ Graded

Document preview thumbnail
Preview 3 out of 27 pages

WGU D278 Scripting and Programming Foundations Pre-Assessment V2 Exam Actual Exam 2026/2027 – Real-Style Questions with Answers | 100% Correct | Programming Fundamentals, Variables, Data Types, Control Structures, Functions | Graded A+ Verified | Scripting Languages, Syntax, Logic, Debugging, Problem-Solving, Algorithms | Detailed Rationales | Verified Correct Answers – Pass Guaranteed – Instant Download

Content preview

Assessment V2 (Latest 2026/2027 Update) Scripting and Programming - Foundations | Questions and Verified Answers| 100% Correct| Grade A 2026/2027 | Page 1 | Pas



WESTERN GOVERNORS UNIVERSITY


WGU D278 Pre-Assessment V2
(Latest 2026/2027 Update) Scripting and Programming - Foundations
Questions and Verified Answers | 100%% Correct | Grade A
2026/2027 Edition - Official Exam 2026/2027


75 80% N/A
QUESTIONS PASSING SCORE RECERTIFICATION




TABLE OF CONTENTS
Section 1 Programming Fundamentals and Logic Q1-15


Section 2 Data Types, Variables, and Operators Q16-30


Section 3 Control Structures (Loops and Conditionals) Q31-45


Section 4 Functions and Modular Programming Q46-60


Section 5 Arrays, Lists, and Basic Data Structures Q61-75


Instructions: Select the single best answer for each question. This exam is designed for WGU
D278 Scripting and Programming - Foundations certification preparation. Passing score: 80%
(60 questions correct).




WGU D278 Scripting and Programming - Foundations -- 2026/2027 | Passing Score: 80% | Page 1 of 27

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming -


Q1. Question 1 of 75

Q1. A software developer is designing a flowchart for a payroll application that must calculate gross pay
from hours worked and hourly rate. The developer uses a rectangular symbol in the flowchart to
represent the step where gross pay is computed. In standard flowchart notation, what does a rectangle
represent?
A. A terminal symbol indicating start or end
B. A decision symbol representing a conditional test
C. A process symbol representing a calculation or action
D. An input/output symbol representing data entry

Correct Answer: C
Rationale:
A rectangle in standard flowchart notation represents a process step such as a calculation, assignment, or
action. The diamond shape is used for decisions, parallelograms for input/output, and rounded rectangles
or ovals for terminals.


Q2. Question 2 of 75

Q2. A student is writing pseudocode for a program that converts Celsius to Fahrenheit using the
formula F = (9/5)*C + 32. The student wants to ensure the conversion logic is clear before coding.
Which principle of algorithm design does this approach best demonstrate?
A. Encapsulation of data within objects
B. Polymorphism through multiple representations
C. Top-down design by planning logic before implementation
D. Inheritance from a base conversion class

Correct Answer: C
Rationale:
Writing pseudocode before actual coding exemplifies top-down design, where the algorithm's logic is
planned at a high level before detailed implementation. Encapsulation, polymorphism, and inheritance are
object-oriented concepts not relevant to this scenario.


Q3. Question 3 of 75

Q3. A programmer reviews a set of step-by-step instructions that detail how to sort a list of student
grades in descending order. These instructions, when written in a programming language, will produce
a working program. What term best describes this ordered set of instructions?
A. A syntax rule
B. A variable declaration
C. A compiler directive
D. An algorithm

Correct Answer: D
Rationale:
An algorithm is a finite, ordered set of well-defined instructions that performs a computation or solves a
problem. Syntax rules govern language grammar, compiler directives instruct the compiler, and variable
declarations allocate storage.

WGU D278 Scripting and Programming - Foundations -- 2026/2027 | Passing Score: 80% | Page 2 of 27

, Q4. Question 4 of 75

Q4. An instructor explains that a particular programming language uses indentation to define code
blocks instead of braces or keywords. A student asks which language follows this convention. Which
language is the instructor most likely referring to?
A. Java
B. C++
C. Ruby
D. Python

Correct Answer: D
Rationale:
Python uses indentation (whitespace) to define code blocks, which is a distinctive feature compared to
Java, C++, and Ruby that use braces or keywords like 'end' to delimit blocks.


Q5. Question 5 of 75

Q5. A developer encounters a syntax error when compiling a program. The compiler reports that a
semicolon is missing at the end of a statement. What type of error does this represent?
A. A syntax error violating language grammar rules
B. A logical error producing incorrect results
C. A runtime error occurring during execution
D. A semantic error with correct syntax but wrong meaning

Correct Answer: A
Rationale:
A missing semicolon violates the grammar rules of the language, making it a syntax error. Logical errors
produce wrong results but do not prevent compilation, runtime errors occur during execution, and semantic
errors involve correct syntax with unintended meaning.


Q6. Question 6 of 75

Q6. A programmer writes a loop that is supposed to sum the values from 1 to 10, but the result is
always 0. Upon inspection, the loop body never executes because the loop condition is false from the
start. What type of error is this?
A. Syntax error
B. Compilation error
C. Runtime error
D. Logical error

Correct Answer: D
Rationale:
A loop that never executes due to an incorrectly written condition is a logical error: the program compiles
and runs but produces incorrect results. There is no syntax or compilation error, and the program does not
crash at runtime.




WGU D278 Scripting and Programming - Foundations -- 2026/2027 | Passing Score: 80% | Page 3 of 27

Document information

Uploaded on
June 5, 2026
Number of pages
27
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
STUVIAACTUALEXAMS
3.5
(156)
Sold
1202
Followers
205
Items
8720
Last sold
9 hours ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions