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
Exam (elaborations)

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

Rating
-
Sold
-
Pages
39
Grade
A+
Uploaded on
05-06-2026
Written in
2025/2026

WGU D278 Scripting and Programming Foundations Final 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

Show more Read less
Institution
WGU D278
Course
WGU D278

Content preview

nal Exam Prep (Latest 2026/2027 Update) Scripting and Programming - Foundations | Questions and Verified Answers| 100% Correct| Grade A 2026/2027 | Page 1 | Passin



WESTERN GOVERNORS UNIVERSITY


WGU D278 Final Exam Prep
(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-Q15


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


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


Section 4 Functions and Modular Programming Q46-Q60


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




Instructions: Select the single best answer for each question. This exam is designed for WGU D278 Scripting and Programming -




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

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027


Q1 Question 1 of 75
A software developer is writing a program that processes user input and produces formatted
output. The developer describes the solution as a sequence of steps that transform input into
output. What term best describes this step-by-step procedure?

A. A. Algorithm
B. B. Syntax
C. C. Variable
D. D. Compiler


Correct Answer: A

Rationale:
An algorithm is a finite, step-by-step procedure for solving a problem or performing a computation. Syntax
refers to the rules governing the structure of code in a programming language, not the logical steps. A
variable stores data, and a compiler translates source code into machine code.




Q2 Question 2 of 75
A student is learning about how computers execute programs. The instructor explains that
source code must be converted into machine code before the processor can run it. What type
of software performs this conversion for languages like C and C++?

A. A. Interpreter
B. B. Compiler
C. C. Debugger
D. D. Linker


Correct Answer: B

Rationale:
A compiler translates the entire source code of a compiled language like C or C++ into machine code before
execution. An interpreter executes code line by line without producing a standalone machine-code file. A
debugger helps find errors, and a linker combines object files but does not perform the initial translation.




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

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027


Q3 Question 3 of 75
A programmer is designing a solution and draws a diagram using oval shapes for start and
end, rectangles for processes, and diamonds for decisions. What type of diagram is the
programmer creating?

A. A. UML class diagram
B. B. Entity-relationship diagram
C. C. Flowchart
D. D. Network topology diagram


Correct Answer: C

Rationale:
A flowchart uses ovals for terminals (start/end), rectangles for processes, and diamonds for decisions to
visually represent an algorithm. UML class diagrams show object-oriented class structures,
entity-relationship diagrams model database schemas, and network topology diagrams illustrate network
connections.




Q4 Question 4 of 75
A developer encounters a situation where the program compiles successfully but produces
incorrect output when given specific inputs. What type of error is this?

A. A. Syntax error
B. B. Runtime error
C. C. Compilation error
D. D. Logic error


Correct Answer: D

Rationale:
A logic error occurs when a program compiles and runs without crashing but produces incorrect results due
to flawed reasoning in the code. Syntax errors and compilation errors prevent the program from compiling.
Runtime errors cause the program to crash during execution, not to produce wrong output.




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

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027


Q5 Question 5 of 75
A team lead is reviewing a colleague's code and notices that variable names like x, y1, and
temp are used throughout. The lead recommends renaming them to studentCount, totalScore,
and maxTemperature. What principle is the lead emphasizing?

A. A. Self-documenting code
B. B. Code obfuscation
C. C. Encapsulation
D. D. Polymorphism


Correct Answer: A

Rationale:
Self-documenting code uses descriptive variable and function names that clearly convey their purpose,
reducing the need for separate comments. Code obfuscation deliberately makes code harder to read.
Encapsulation hides internal state, and polymorphism allows objects to take multiple forms.




Q6 Question 6 of 75
A programmer writes a program that reads a temperature value and needs to categorize it as
cold, mild, or hot. Before writing any code, the programmer creates a table showing all
possible input ranges and their corresponding outputs. What phase of program development
does this represent?

A. A. Testing
B. B. Design
C. C. Debugging
D. D. Deployment


Correct Answer: B

Rationale:
Creating a mapping of inputs to outputs before coding is part of the design phase, where the programmer
plans the logic and structure of the solution. Testing involves verifying the completed program works
correctly. Debugging fixes errors found during testing. Deployment distributes the finished program.




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

Written for

Institution
WGU D278
Course
WGU D278

Document information

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

Subjects

$16.99
Get access to the full document:

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

Get to know the seller

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 University Of California - Los Angeles (UCLA)
View profile
Follow You need to be logged in order to follow users or courses
Sold
1106
Member since
3 year
Number of followers
206
Documents
8006
Last sold
8 hours ago
Actual Exam

STUVIAACTUALEXAMS is a trusted exam-success delivering accurate, verified, and exam-focused study materials that include real exam-style questions, correct answers, and clear, easy-to-follow rationales, all professionally organized to save time, eliminate guesswork, reduce stress, boost confidence, and help students secure top grades and pass their exams on the first attempt with certainty and ease.

3.5

144 reviews

5
58
4
24
3
24
2
11
1
27

Recently viewed by you

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