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 Pre-Assessment V1 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 Pre-Assessment V1 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 Scripting And Programming Foundations
Course
WGU D278 Scripting and Programming Foundations

Content preview

U D278 Pre-Assessment V1 (Latest 2026/2027 Update) Scripting and Programming - Foundations | Questions and Verified Answers| 100% Correct| Grade A 2026/2027 | Page 1 | Passing Score: 8



WESTERN GOVERNORS UNIVERSITY

WGU D278 Pre-Assessment V1 (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 22-year-old computer science student is writing her first program and needs to understand
the basic building blocks of any algorithm. Her instructor explains that every algorithm must
have a finite number of well-defined steps that produce a result. This property of algorithms is
known as which of the following?

A. Recursion
B. Finiteness
C. Polymorphism
D. Inheritance


Correct Answer: B

Rationale:
Finiteness means an algorithm must terminate after a finite number of steps, which is a fundamental
property distinguishing algorithms from open-ended processes. Recursion is a technique where a function
calls itself, and polymorphism and inheritance are object-oriented programming concepts, not algorithm
properties.




Q2 Question 2 of 75
A software developer is designing a program to calculate the area of a rectangle. She writes
down the step-by-step process: first get the length, then get the width, then multiply them,
then display the result. This step-by-step representation is best described as which of the
following?

A. Source code
B. Pseudocode
C. Compiled bytecode
D. Machine language


Correct Answer: B

Rationale:
Pseudocode is an informal, human-readable description of an algorithm that uses plain language steps
without conforming to any specific programming language syntax. Source code is written in an actual
programming language, bytecode is compiled intermediate code, and machine language is binary
instructions the processor executes.




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 first-year programming student encounters a syntax error when compiling his Python
program. The error message indicates a missing colon at the end of an if statement. Which
phase of the programming process does this error belong to?

A. Design phase
B. Compilation phase
C. Testing phase
D. Deployment phase


Correct Answer: B

Rationale:
A syntax error is detected during the compilation (or interpretation) phase when the language processor
parses the source code and finds it does not conform to the grammar rules of the language. Design errors
are logic problems found during testing, and deployment happens after the code compiles and passes
testing.




Q4 Question 4 of 75
A junior developer is asked to trace through a program that adds the numbers 1 through 5
using a loop. She manually steps through each iteration, writing down the current value of the
sum variable after each step. This manual step-by-step execution is called which of the
following?

A. Compiling
B. Dry running or desk checking
C. Debugging with a debugger
D. Profiling


Correct Answer: B

Rationale:
Dry running or desk checking involves manually stepping through code line by line to trace variable values
and logic flow without actually executing the program on a computer. Compiling converts source code to
machine code, debugging uses automated tools, and profiling measures performance.




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 software engineering team follows the waterfall development methodology for a project. The
team lead emphasizes that each phase must be completed before the next begins. Which is
the correct sequence of phases in the waterfall model?

A. Coding, Design, Requirements, Testing, Maintenance
B. Requirements, Design, Coding, Testing, Maintenance
C. Testing, Requirements, Design, Coding, Maintenance
D. Maintenance, Testing, Coding, Design, Requirements


Correct Answer: B

Rationale:
The waterfall model follows a linear sequence starting with Requirements gathering, then Design, then
Coding (implementation), then Testing, and finally Maintenance. This sequential approach means each
phase must be completed before moving to the next, unlike agile methodologies that iterate.




Q6 Question 6 of 75
A student runs her program and receives an output of 25 when she expected 15 for a
calculation that should compute the average of 10 and 20. The program adds the two
numbers instead of dividing their sum by 2. What type of error does this represent?

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


Correct Answer: B

Rationale:
A logic error occurs when a program runs without crashing but produces incorrect results because the
algorithm or formula is wrong. The program adds instead of averaging, which is a flaw in the program logic.
Syntax and compilation errors prevent the program from running, and runtime errors cause crashes.




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

Written for

Institution
WGU D278 Scripting and Programming Foundations
Course
WGU D278 Scripting and Programming Foundations

Document information

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

Subjects

$16.49
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)
Follow You need to be logged in order to follow users or courses
Sold
1052
Member since
3 year
Number of followers
204
Documents
7578
Last sold
20 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

142 reviews

5
59
4
24
3
21
2
10
1
28

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