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

WGU D278 Final Exam Prep Actual Exam 2026/2027 – 100% Verified | Detailed Rationales – Pass Guaranteed – A+ Graded

Document preview thumbnail
Preview 3 out of 30 pages

WGU D278 Final Exam Prep Actual Exam 2026/2027 – 100% Correct Answers | Real-Style Questions with Answers | Scripting and Programming Foundations, Python Syntax, Algorithms | Graded A+ Verified | Data Structures, Control Flow | Detailed Rationales | Verified Correct Answers – Pass Guaranteed – Instant Download

Content preview

WGU D278 Final Exam Prep (Latest Update 2026/2027) Scripting



OBJECTIVE ASSESSMENT - EXAM



WGU D278 Final Exam Prep (Latest
Update 2026/2027) Scripting and
Programming - Foundations |
Questions and Verified Answers |
100% Correct | Grade A 2026/2027


QUESTIONS: 75 VERIFIED ANSWERS: 75 EDITION: 2026/2027 EditionPASSING: 8




TOPICS COVERED
• Programming Logic & Flowcharts • Functions, Recursion & Scope
• Pseudocode & Algorithm Design • Arrays, Stacks, Queues & Hash Tables
• Compiled vs Interpreted Languages • Sorting, Searching & Merge Algorithms
• Variables, Constants & Data Types • String Parsing & Manipulation
• Operator Precedence & Type Casting • Classes, Objects & Inheritance
• Short-Circuit Evaluation • Encapsulation, Polymorphism & Interfaces
• If-Else, Switch & Ternary Operators • File I/O & Exception Handling
• Loops: For, While, Do-While • Debugging, Unit Testing & Version Control




COVER PAGE - 1

,Section 1: Programming Fundamentals, Logic & Problem Solving



Q1.
A junior developer is tasked with writing a program that calculates the total cost of items in a shopping cart,
including tax. The developer begins by breaking the problem into smaller steps: input item prices, sum them,
apply tax rate, and output the final amount.

A. The developer is using top-down design to decompose a complex problem into manageable
sub-problems.
B. The developer is performing code refactoring to improve runtime performance.
C. The developer is implementing object inheritance to reuse existing classes.
D. The developer is applying recursion to solve the calculation repeatedly.

Correct Answer: A
Rationale:
Breaking a problem into smaller, manageable steps is the essence of top-down design and algorithmic decomposition.
Option B confuses planning with refactoring.




Q2.
A software team is reviewing a flowchart for a login system. The flowchart contains a diamond shape that
checks whether the entered password matches the stored hash.

A. The diamond shape represents a decision point where the program flow branches based on a true
or false condition.
B. The diamond shape indicates a loop that will repeat until the password is correct.
C. The diamond shape is a process step that encrypts the password before storage.
D. The diamond shape represents the start or end of the program execution.

Correct Answer: A
Rationale:
In flowcharts, diamonds universally represent decision points with yes/no or true/false branches. Option B confuses
decisions with loops.




Q3.
A student is learning about pseudocode and writes the following: 'SET total TO 0. FOR each item IN cart,
ADD item price TO total. DISPLAY total.' The instructor reviews this pseudocode.

A. The pseudocode correctly uses sequential and iterative structures to describe an algorithm without
language-specific syntax.
B. The pseudocode contains a syntax error because 'FOR' is not a valid keyword in any programming
language.
C. The pseudocode will fail because it does not declare variable types before use.
D. The pseudocode is actually Python code and can be executed directly by the interpreter.

, WGU D278 Final Exam Prep (Latest Update 2026/2027) Scripting and Programming - Foundations...


Correct Answer: A
Rationale:
Pseudocode is language-agnostic and uses plain English structures to describe algorithms. Option B incorrectly applies
programming language syntax rules to pseudocode.




Q4.
A programmer needs to determine whether a user-input year is a leap year. The algorithm must check if the
year is divisible by 4, but not by 100 unless also divisible by 400.

A. The programmer must use nested conditional logic with modulo operators to evaluate the leap year
rules correctly.
B. A simple check for divisibility by 4 is sufficient for all years in the Gregorian calendar.
C. The programmer should use a random number generator to approximate leap year probability.
D. Leap years occur every 4 years without exception, so no additional logic is needed.

Correct Answer: A
Rationale:
Leap year rules require checking divisibility by 4, 100, and 400 with nested conditions. Option B misses the century
exception.




Q5.
A development team is designing a program to validate email addresses. They create a table listing all
possible valid and invalid email formats, then derive rules from the patterns.

A. The team is using truth tables to systematically evaluate all possible input combinations and
determine correct validation logic.
B. The team is performing unit testing by executing the program with each email address.
C. The team is compiling the source code into machine language before validation.
D. The team is applying machine learning to automatically classify email formats.

Correct Answer: A
Rationale:
Listing all possible cases to derive logic rules is characteristic of truth table analysis. Option B confuses design-time
planning with runtime testing.

Document information

Uploaded on
July 24, 2026
Number of pages
30
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$15.49

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
(157)
Sold
1223
Followers
208
Items
8852
Last sold
15 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