• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 47 pages
Exam (elaborations)

WGU D278 Scripting and Programming Foundations OA Exam Study Guide – Complete Practice Exam with 100% Verified Correct Answers and Detailed Rationales | Latest Update - 2026/2027 | Already Graded A+

Document preview thumbnail
Preview 4 out of 47 pages

Master the WGU D278 Scripting and Programming Foundations OA Exam with this complete study guide featuring 100% verified correct answers and detailed rationales. Cover core programming concepts including expressions and evaluation, sequence and use case diagrams, loop variable initialization and infinite loops, dynamically vs statically typed languages, function calls/arguments/parameters/return values, arrays, algorithms for equality checks, agile and waterfall phases (analysis, design, implementation, testing), programming library advantages, integer and float data types, control structures (while, do-while, if-else), operators (modulo, equality, arithmetic), compiled vs interpreted languages, UML modeling, flowcharts, markup languages, naming conventions, Boolean types, string literals, whitespace, incremental development, and algorithm design before coding. Fully updated for 2026/2027 and Already Graded A+, this resource provides the precise knowledge needed to pass your OA with confidence.

Content preview

WGU D278 Scripting and Programming
Foundations OA Exam Study Guide – Complete
Practice Exam with 100% Verified Correct
Answers and Detailed Rationales | Latest Update -
2026/2027 | Already Graded A+


Question 1
A combination of items, like variables, literals, operators, and parentheses, that
evaluates to a value. Ex: 2 * (x + 1) is an expression. If x is 3, the expression
evaluates to the value 8.
A. Expression
B. Design
C. Input
D. Variables
Answer: A
Rationale: An expression is a combination of variables, literals, operators, and
parentheses that evaluates to a value. For example, 2 * (x + 1) evaluates to 8 when
x = 3. The other options are not definitions of an expression.


Question 2
A behavioral diagram that shows interaction between software components and
indicates the order of events.
A. Sequence diagram
B. Use case diagram
C. Life diagram
D. Object diagram
Answer: A
Rationale: A sequence diagram is a behavioral diagram that shows interactions
between software components and the order of events over time. Use case


pg. 1

,diagrams show user interactions; class diagrams show structure; object diagrams
show instances.


Question 3
What is the loop variable initialization in the following pseudocode?
y=0
s = 100.0
while y < 10
s = s + (s * 5.0)
y=y+1
A. y = 0
B. s = s + (s * 5.0)
C. y = y + 1
D. s = 100.0
Answer: A
Rationale: The loop variable initialization is the statement that sets the loop
variable to its starting value before the loop begins. Here, y = 0 initializes the loop
variable. The loop expression is y < 10; the update is y = y + 1.


Question 4
A variable's type may change while a program executes, based on what is assigned
to the variable.
A. Dynamically typed
B. Weekly typed
C. Strongly typed
D. Statically typed
Answer: A
Rationale: Dynamically typed languages allow a variable's type to change during
execution based on what is assigned (e.g., Python, JavaScript). Statically typed
languages require type declaration and do not allow type changes (e.g., C, Java).




pg. 2

,Question 5
Consists of the function name and parentheses, within which comma-separated
arguments (if any) appear.
A. Function call
B. Process
C. Design
D. None of these
Answer: A
Rationale: A function call consists of the function name followed by parentheses,
with arguments separated by commas inside the parentheses. For example,
myFunction(2, 3). A process is a program in execution.


Question 6
What is the return value of a function?
A. Variable in the declaration of the function
B. Data passed to the function
C. Call to run the function
D. Output of a function
Answer: D
Rationale: The return value is the output of a function—the data the function
produces and sends back to the caller. Parameters are inputs to the function; a
function call invokes the function.


Question 7
An ordered list of items of a given data type.
A. Array
B. Object
C. Loop
D. String
Answer: A
Rationale: An array is an ordered list of items of the same data type (e.g., an array
of integers). A string is a sequence of characters; an object is an instance of a class;
a loop is a control structure.
pg. 3

, Question 8
What does the following algorithm determine?
if x == y
z=1
else
z=0
A. Whether x is 0
B. Whether x and y are negative
C. Whether x is 1
D. Whether x and y are the same
Answer: D
Rationale: The algorithm checks if x and y are equal. If they are the same, z is set
to 1; otherwise, z is set to 0. It does not check for negativity, zero, or whether x is 1
specifically.


Question 9
A programmer shows a program's first version to a customer. Based on feedback,
the programmer creates a second version, and then has a colleague run the second
version on numerous inputs to ensure outputs are correct. Which phase of an agile
approach is that colleague carrying out?
A. Design
B. Analysis
C. Testing
D. Implementation
Answer: C
Rationale: Testing is the phase where the program is run with various inputs to
verify correct outputs. This validates the program's functionality. Design and
Analysis occur before coding; Implementation is writing the code.


Question 10
What is an advantage of using a programming library?

pg. 4

Document information

Uploaded on
September 9, 2026
Number of pages
47
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$23.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.
ExamsWizard
4.1
(38)
Sold
194
Followers
13
Items
1094
Last sold
11 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